提交 b8e5c4c2 编写于 作者: T Trond Myklebust

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: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 642ac549
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册