xfs
[Top] [All Lists]

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

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 12/15] xfs: use vfs inode nlink field everywhere
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 17 Feb 2016 18:49:53 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160217073506.GC16363@xxxxxxxxxxxxx>
References: <1455693652-3899-1-git-send-email-david@xxxxxxxxxxxxx> <1455693652-3899-13-git-send-email-david@xxxxxxxxxxxxx> <20160217073506.GC16363@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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

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