[PATCH] pnfsd: Fix unlock bug on error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Yanchuan Nian <ycnian@xxxxxxxxx>

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

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux