xfs
[Top] [All Lists]

Re: [PATCH 18/27] xfs: avoid usage of struct xfs_dir2_data

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 18/27] xfs: avoid usage of struct xfs_dir2_data
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 6 Jul 2011 04:43:57 -0400
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20110706030228.GM1026@dastard>
References: <20110701094321.936534538@xxxxxxxxxxxxxxxxxxxxxx> <20110701094606.003170984@xxxxxxxxxxxxxxxxxxxxxx> <20110706030228.GM1026@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Jul 06, 2011 at 01:02:28PM +1000, Dave Chinner wrote:
> > @@ -251,12 +258,13 @@ xfs_dir2_data_freeinsert(
> >     xfs_dir2_data_free_t    new;            /* new bestfree entry */
> >  
> >  #ifdef __KERNEL__
> > -   ASSERT(be32_to_cpu(d->hdr.magic) == XFS_DIR2_DATA_MAGIC ||
> > -          be32_to_cpu(d->hdr.magic) == XFS_DIR2_BLOCK_MAGIC);
> > +   ASSERT(be32_to_cpu(hdr->magic) == XFS_DIR2_DATA_MAGIC ||
> > +          be32_to_cpu(hdr->magic) == XFS_DIR2_BLOCK_MAGIC);
> >  #endif
> 
> You kill the ifdef __KERNEL__ there.

If I do it I'd rather do it as a sepaarate patch, and after actually
testing it with xfsprogs.

> >                     if (!needscan) {
> > -                           xfs_dir2_data_freeremove(d, dfp, needlogp);
> > -                           (void)xfs_dir2_data_freeinsert(d, newdup,
> > +                           xfs_dir2_data_freeremove(hdr, dfp, needlogp);
> > +                           (void)xfs_dir2_data_freeinsert(hdr, newdup,
> >                                     needlogp);
> > -                           (void)xfs_dir2_data_freeinsert(d, newdup2,
> > +                           (void)xfs_dir2_data_freeinsert(hdr, newdup2,
> >                                     needlogp);
> >                     }
> >             }
> 
> Kill the (void) casts?
> 

Sounds fine.

<Prev in Thread] Current Thread [Next in Thread>