[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87fwivaa26.fsf@tucsk.pomaz.szeredi.hu>
Date: Fri, 14 Oct 2011 17:04:49 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: Steven Whitehouse <swhiteho@...hat.com>
Cc: viro@...IV.linux.org.uk, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, jack@...e.cz, hch@...radead.org,
akpm@...ux-foundation.org, toshi.okajima@...fujitsu.com
Subject: Re: [PATCH 10/13] filesystems: add set_nlink()
Steven Whitehouse <swhiteho@...hat.com> writes:
> Hi,
>
> On Wed, 2011-10-12 at 16:49 +0200, Miklos Szeredi wrote:
>> From: Miklos Szeredi <mszeredi@...e.cz>
>>
>> Replace remaining direct i_nlink updates with a new set_nlink()
>> updater function.
>>
>> Signed-off-by: Miklos Szeredi <mszeredi@...e.cz>
>> ---
> [snip]
>
>
>
>> diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
>> index da21eca..102cf5e 100644
>> --- a/fs/gfs2/glops.c
>> +++ b/fs/gfs2/glops.c
>> @@ -277,7 +277,7 @@ static void gfs2_set_nlink(struct inode *inode, u32 nlink)
>> if (nlink == 0)
>> clear_nlink(inode);
>> else
>> - inode->i_nlink = nlink;
>> + set_nlink(inode, nlink);
>> }
>> }
>
> So long as it is ok to call set_nlink() with nlink == 0, then the if
> statement here can be removed and just replaced with set_nlink()
Current patchset will WARN if set_nlink() is called with nlink == 0. I
think it's cleaner to keep the two cases separate.
Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists