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] [day] [month] [year] [list]
Date:	Fri, 4 Jan 2013 15:51:39 +0000
From:	"Myklebust, Trond" <Trond.Myklebust@...app.com>
To:	"ycnian@...il.com" <ycnian@...il.com>
CC:	"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pnfs: Increase the refcount when LAYOUTGET fails the
 first time

On Fri, 2013-01-04 at 20:19 +0800, ycnian@...il.com wrote:
> From: Yanchuan Nian <ycnian@...il.com>
> 
> The layout will be set unusable if LAYOUTGET fails. Is it reasonable to
> increase the refcount iff LAYOUTGET fails the first time?
> 
> Signed-off-by: Yanchuan Nian <ycnian@...il.com>
> ---
>  fs/nfs/pnfs.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> index e7165d9..d00260b 100644
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -254,7 +254,7 @@ static void
>  pnfs_layout_set_fail_bit(struct pnfs_layout_hdr *lo, int fail_bit)
>  {
>  	lo->plh_retry_timestamp = jiffies;
> -	if (test_and_set_bit(fail_bit, &lo->plh_flags))
> +	if (!test_and_set_bit(fail_bit, &lo->plh_flags))
>  		atomic_inc(&lo->plh_refcount);
>  }
>  
Thank for spotting this! Applying to the bugfixes branch...

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@...app.com
www.netapp.com
--
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