Re: [PATCH 12/15] xfs: use vfs inode nlink field everywhere

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

 



On Tue, Feb 16, 2016 at 11:35:06PM -0800, Christoph Hellwig wrote:
> > index 685c7a7..1408be3 100644
> > --- a/libxfs/libxfs_api_defs.h
> > +++ b/libxfs/libxfs_api_defs.h
> > @@ -108,4 +108,8 @@
> >  
> >  #define xfs_verify_cksum		libxfs_verify_cksum
> >  
> > +/* inode link counts */
> > +#define set_nlink(inode, nlink)	({ (inode)->i_nlink = (nlink); })
> > +#define inc_nlink(inode)	(inode)->i_nlink++
> 
> Can we defines these as inlines?

I'll probably have to move them somewhere else for that.
include/xfs_inode.h will probably work.

> 
> > +		ip->i_vnode.i_nlink++;		/* account for . */
> 
> Shouldn't we use VFS_I() like everywhere else?

inc_nlink(), too. I forgot to go back and change it when I decided
on adding the wrapper.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
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