All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pnfsd: Fix unlock bug on error path
@ 2013-01-15  3:07 ycnian
  2013-01-21 14:43 ` Benny Halevy
  0 siblings, 1 reply; 2+ messages in thread
From: ycnian @ 2013-01-15  3:07 UTC (permalink / raw)
  To: bhalevy; +Cc: linux-nfs, Yanchuan Nian

From: Yanchuan Nian <ycnian@gmail.com>

LAYOUTGET procedure fails if the layout requested conflicts with the recalled.
It needs to put the reference and unlock the state before exiting.

Signed-off-by: Yanchuan Nian <ycnian@gmail.com>
---
 fs/nfsd/nfs4pnfsd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfs4pnfsd.c b/fs/nfsd/nfs4pnfsd.c
index dd7856c..4a1e17b 100644
--- a/fs/nfsd/nfs4pnfsd.c
+++ b/fs/nfsd/nfs4pnfsd.c
@@ -760,7 +760,7 @@ nfs4_pnfs_get_layout(struct nfsd4_pnfs_layoutget *lgp,
 
 	if (is_layout_recalled(clp, lgp->lg_fhp, &lgp->lg_seg)) {
 		nfserr = nfserr_recallconflict;
-		goto out;
+		goto out_unlock;
 	}
 
 	/* pre-alloc layout in case we can't merge after we call
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] pnfsd: Fix unlock bug on error path
  2013-01-15  3:07 [PATCH] pnfsd: Fix unlock bug on error path ycnian
@ 2013-01-21 14:43 ` Benny Halevy
  0 siblings, 0 replies; 2+ messages in thread
From: Benny Halevy @ 2013-01-21 14:43 UTC (permalink / raw)
  To: ycnian; +Cc: linux-nfs

On 2013-01-15 05:07, ycnian@gmail.com wrote:
> From: Yanchuan Nian <ycnian@gmail.com>
> 
> LAYOUTGET procedure fails if the layout requested conflicts with the recalled.
> It needs to put the reference and unlock the state before exiting.
> 
> Signed-off-by: Yanchuan Nian <ycnian@gmail.com>

Good catch. Thanks.
Committing for pnfs-all-3.7 and latest.

Benny

> ---
>  fs/nfsd/nfs4pnfsd.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4pnfsd.c b/fs/nfsd/nfs4pnfsd.c
> index dd7856c..4a1e17b 100644
> --- a/fs/nfsd/nfs4pnfsd.c
> +++ b/fs/nfsd/nfs4pnfsd.c
> @@ -760,7 +760,7 @@ nfs4_pnfs_get_layout(struct nfsd4_pnfs_layoutget *lgp,
>  
>  	if (is_layout_recalled(clp, lgp->lg_fhp, &lgp->lg_seg)) {
>  		nfserr = nfserr_recallconflict;
> -		goto out;
> +		goto out_unlock;
>  	}
>  
>  	/* pre-alloc layout in case we can't merge after we call
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-21 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-15  3:07 [PATCH] pnfsd: Fix unlock bug on error path ycnian
2013-01-21 14:43 ` Benny Halevy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.