Skip to content
Snippets Groups Projects
Commit d7631250 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFSv4: Fix a potentially Oopsable condition in __nfs_idmap_unregister


Ensure that __nfs_idmap_unregister can be called twice without
consequences.

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 6b2fddd3
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment