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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux