lkml.org 
[lkml]   [2011]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 10/13] filesystems: add set_nlink()
From
Date
Hi,

On Wed, 2011-10-12 at 16:49 +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@suse.cz>
>
> Replace remaining direct i_nlink updates with a new set_nlink()
> updater function.
>
> Signed-off-by: Miklos Szeredi <mszeredi@suse.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()

Steve.





\
 
 \ /
  Last update: 2011-10-13 18:35    [W:0.190 / U:4.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site