aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sunrpc/rpc_pipe_fs.h5
-rw-r--r--net/sunrpc/clnt.c6
-rw-r--r--net/sunrpc/rpc_pipe.c11
3 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h
index 91f5b13389c5..8de0ac276499 100644
--- a/include/linux/sunrpc/rpc_pipe_fs.h
+++ b/include/linux/sunrpc/rpc_pipe_fs.h
@@ -44,8 +44,9 @@ RPC_I(struct inode *inode)
44 44
45extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *); 45extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *);
46 46
47extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *); 47struct rpc_clnt;
48extern int rpc_rmdir(struct dentry *); 48extern struct dentry *rpc_create_client_dir(const char *, struct rpc_clnt *);
49extern int rpc_remove_client_dir(struct dentry *);
49extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *, 50extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *,
50 const struct rpc_pipe_ops *, int flags); 51 const struct rpc_pipe_ops *, int flags);
51extern int rpc_unlink(struct dentry *); 52extern int rpc_unlink(struct dentry *);
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index ebfcf9b89909..6ec37701a165 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -113,7 +113,7 @@ rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name)
113 "%s/clnt%x", dir_name, 113 "%s/clnt%x", dir_name,
114 (unsigned int)clntid++); 114 (unsigned int)clntid++);
115 clnt->cl_pathname[sizeof(clnt->cl_pathname) - 1] = '\0'; 115 clnt->cl_pathname[sizeof(clnt->cl_pathname) - 1] = '\0';
116 clnt->cl_dentry = rpc_mkdir(clnt->cl_pathname, clnt); 116 clnt->cl_dentry = rpc_create_client_dir(clnt->cl_pathname, clnt);
117 if (!IS_ERR(clnt->cl_dentry)) 117 if (!IS_ERR(clnt->cl_dentry))
118 return 0; 118 return 0;
119 error = PTR_ERR(clnt->cl_dentry); 119 error = PTR_ERR(clnt->cl_dentry);
@@ -232,7 +232,7 @@ static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args, stru
232 232
233out_no_auth: 233out_no_auth:
234 if (!IS_ERR(clnt->cl_dentry)) { 234 if (!IS_ERR(clnt->cl_dentry)) {
235 rpc_rmdir(clnt->cl_dentry); 235 rpc_remove_client_dir(clnt->cl_dentry);
236 rpc_put_mount(); 236 rpc_put_mount();
237 } 237 }
238out_no_path: 238out_no_path:
@@ -424,7 +424,7 @@ rpc_free_client(struct kref *kref)
424 dprintk("RPC: destroying %s client for %s\n", 424 dprintk("RPC: destroying %s client for %s\n",
425 clnt->cl_protname, clnt->cl_server); 425 clnt->cl_protname, clnt->cl_server);
426 if (!IS_ERR(clnt->cl_dentry)) { 426 if (!IS_ERR(clnt->cl_dentry)) {
427 rpc_rmdir(clnt->cl_dentry); 427 rpc_remove_client_dir(clnt->cl_dentry);
428 rpc_put_mount(); 428 rpc_put_mount();
429 } 429 }
430 if (clnt->cl_parent != clnt) { 430 if (clnt->cl_parent != clnt) {
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 2a4e6eb0a3e9..08580bedc25f 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -755,7 +755,7 @@ out_bad:
755} 755}
756 756
757/** 757/**
758 * rpc_mkdir - Create a new directory in rpc_pipefs 758 * rpc_create_client_dir - Create a new rpc_client directory in rpc_pipefs
759 * @path: path from the rpc_pipefs root to the new directory 759 * @path: path from the rpc_pipefs root to the new directory
760 * @rpc_client: rpc client to associate with this directory 760 * @rpc_client: rpc client to associate with this directory
761 * 761 *
@@ -764,8 +764,8 @@ out_bad:
764 * information about the client, together with any "pipes" that may 764 * information about the client, together with any "pipes" that may
765 * later be created using rpc_mkpipe(). 765 * later be created using rpc_mkpipe().
766 */ 766 */
767struct dentry * 767struct dentry *rpc_create_client_dir(const char *path,
768rpc_mkdir(char *path, struct rpc_clnt *rpc_client) 768 struct rpc_clnt *rpc_client)
769{ 769{
770 struct nameidata nd; 770 struct nameidata nd;
771 struct dentry *dentry; 771 struct dentry *dentry;
@@ -797,11 +797,10 @@ out_err:
797} 797}
798 798
799/** 799/**
800 * rpc_rmdir - Remove a directory created with rpc_mkdir() 800 * rpc_remove_client_dir - Remove a directory created with rpc_create_client_dir()
801 * @dentry: directory to remove 801 * @dentry: directory to remove
802 */ 802 */
803int 803int rpc_remove_client_dir(struct dentry *dentry)
804rpc_rmdir(struct dentry *dentry)
805{ 804{
806 struct dentry *parent; 805 struct dentry *parent;
807 struct inode *dir; 806 struct inode *dir;