Skip to content

Commit 3396f92

Browse files
jtlaytonTrond Myklebust
authored andcommitted
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 <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
1 parent 6aa23d7 commit 3396f92

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎net/sunrpc/rpc_pipe.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,6 +1313,8 @@ rpc_gssd_dummy_populate(struct dentry *root, struct rpc_pipe *pipe_data)
13131313
}
13141314

13151315
pipe_dentry = rpc_mkpipe_dentry(clnt_dentry, "gssd", NULL, pipe_data);
1316+
if (IS_ERR(pipe_dentry))
1317+
__rpc_depopulate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1);
13161318
out:
13171319
dput(clnt_dentry);
13181320
dput(gssd_dentry);

0 commit comments

Comments
 (0)