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

NFSv4: Fix a potentially Oopsable condition in __nfs_idmap_unregister

Ensure that __nfs_idmap_unregister can be called twice without
consequences.
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 6b2fddd3
......@@ -404,8 +404,10 @@ static struct key_type key_type_id_resolver_legacy = {
static void __nfs_idmap_unregister(struct rpc_pipe *pipe)
{
if (pipe->dentry)
if (pipe->dentry) {
rpc_unlink(pipe->dentry);
pipe->dentry = NULL;
}
}
static int __nfs_idmap_register(struct dentry *dir,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册