[PATCH 12/15] xfs: use vfs inode nlink field everywhere
Dave Chinner
david at fromorbit.com
Wed Feb 17 01:49:53 CST 2016
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 at fromorbit.com
More information about the xfs
mailing list