From: Jeff Layton Date: Thu, 5 Dec 2013 12:33:49 +0000 (-0500) Subject: rpc_pipe: remove the clntXX dir if creating the pipe fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3396f92f8be606ea485b0a82d4e7749a448b013b;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git rpc_pipe: remove the clntXX dir if creating the pipe fails In the event that we create the gssd/clntXX dir, but the pipe creation subsequently fails, then we should remove the clntXX dir before returning. Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 5cd7ad1225a3..0b74c61db7b4 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -1313,6 +1313,8 @@ rpc_gssd_dummy_populate(struct dentry *root, struct rpc_pipe *pipe_data) } pipe_dentry = rpc_mkpipe_dentry(clnt_dentry, "gssd", NULL, pipe_data); + if (IS_ERR(pipe_dentry)) + __rpc_depopulate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1); out: dput(clnt_dentry); dput(gssd_dentry);