From: Trond Myklebust Date: Mon, 26 Aug 2013 21:26:51 +0000 (-0400) Subject: NFSv4: Fix a potentially Oopsable condition in __nfs_idmap_unregister X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d7631250b20119ea763d9ba461c3a9c5710cfa98;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 --- diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index e9b0c59f9286..8b7e94ac096b 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c @@ -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,