]> err.no Git - linux-2.6/commitdiff
NFSv4: If a delegated open fails, ensure that we return the delegation
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 18 Oct 2005 21:20:20 +0000 (14:20 -0700)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 18 Oct 2005 21:20:20 +0000 (14:20 -0700)
 Unless of course the open fails due to permission issues.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c

index c10dcd12af5196b835340cc71008782b85ab7020..a8be9af610ac29d96042efe6dee321a9d1adaee6 100644 (file)
@@ -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;
 }