summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/rpc_pipe.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-26 23:44:26 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-09-01 17:12:42 +0200
commitc36dcfe1f7712b7c12df2d80359e638b9d246ce6 (patch)
treec60e48fbe790d51aba77b062a002cc0032e4a612 /net/sunrpc/rpc_pipe.c
parentNFSv4: Convert idmapper to use the new framework for pipefs dentries (diff)
downloadlinux-c36dcfe1f7712b7c12df2d80359e638b9d246ce6.tar.xz
linux-c36dcfe1f7712b7c12df2d80359e638b9d246ce6.zip
SUNRPC: Remove the rpc_client->cl_dentry
It is now redundant. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/rpc_pipe.c')
-rw-r--r--net/sunrpc/rpc_pipe.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index cfeba77de567..a35b2f402aaa 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -1055,15 +1055,16 @@ struct dentry *rpc_create_client_dir(struct dentry *dentry,
/**
* rpc_remove_client_dir - Remove a directory created with rpc_create_client_dir()
- * @dentry: dentry for the pipe
* @rpc_client: rpc_client for the pipe
*/
-int rpc_remove_client_dir(struct dentry *dentry, struct rpc_clnt *rpc_client)
+int rpc_remove_client_dir(struct rpc_clnt *rpc_client)
{
- if (rpc_client->cl_pipedir_objects.pdh_dentry) {
- rpc_destroy_pipe_dir_objects(&rpc_client->cl_pipedir_objects);
- rpc_client->cl_pipedir_objects.pdh_dentry = NULL;
- }
+ struct dentry *dentry = rpc_client->cl_pipedir_objects.pdh_dentry;
+
+ if (dentry == NULL)
+ return 0;
+ rpc_destroy_pipe_dir_objects(&rpc_client->cl_pipedir_objects);
+ rpc_client->cl_pipedir_objects.pdh_dentry = NULL;
return rpc_rmdir_depopulate(dentry, rpc_clntdir_depopulate);
}