From: Trond Myklebust Date: Tue, 18 Oct 2005 21:20:20 +0000 (-0700) Subject: NFSv4: If a delegated open fails, ensure that we return the delegation X-Git-Tag: v2.6.15-rc1~733^2~55^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8e5c4c2978fa666287525a9de2fa648a7581262;p=platform%2Fkernel%2Flinux-3.10.git NFSv4: If a delegated open fails, ensure that we return the delegation Unless of course the open fails due to permission issues. Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index c10dcd1..a8be9af 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -658,6 +658,8 @@ out_err: } up_read(&nfsi->rwsem); up_read(&clp->cl_sem); + if (err != -EACCES) + nfs_inode_return_delegation(inode); return err; }