NFSv4: Fix a potentially Oopsable condition in __nfs_idmap_unregister

Ensure that __nfs_idmap_unregister can be called twice without
consequences.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust 2013-08-26 17:26:51 -04:00
parent 6b2fddd3e7
commit d7631250b2
1 changed files with 3 additions and 1 deletions

View File

@ -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,