[PATCH 18/27] xfs: avoid usage of struct xfs_dir2_data
Christoph Hellwig
hch at infradead.org
Wed Jul 6 03:43:57 CDT 2011
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.
More information about the xfs
mailing list