Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8e5c4c2 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 642ac549
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -658,6 +658,8 @@ static int _nfs4_open_delegated(struct inode *inode, int flags, struct rpc_cred
	}
	up_read(&nfsi->rwsem);
	up_read(&clp->cl_sem);
	if (err != -EACCES)
		nfs_inode_return_delegation(inode);
	return err;
}