lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1318523599.2719.45.camel@menhir>
Date:	Thu, 13 Oct 2011 17:33:19 +0100
From:	Steven Whitehouse <swhiteho@...hat.com>
To:	Miklos Szeredi <miklos@...redi.hu>
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,
	mszeredi@...e.cz
Subject: Re: [PATCH 10/13] filesystems: add set_nlink()

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()

Steve.



--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ