linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rpc_pipe: remove the clntXX dir if creating the pipe fails
@ 2013-12-05 12:33 Jeff Layton
  0 siblings, 0 replies; only message in thread
From: Jeff Layton @ 2013-12-05 12:33 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-nfs

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 <jlayton@redhat.com>
---
 net/sunrpc/rpc_pipe.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 5cd7ad1..0b74c61 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);
-- 
1.8.4.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-05 12:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-05 12:33 [PATCH] rpc_pipe: remove the clntXX dir if creating the pipe fails Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).