aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/idmap.c4
-rw-r--r--include/linux/sunrpc/clnt.h2
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c8
-rw-r--r--net/sunrpc/clnt.c21
4 files changed, 17 insertions, 18 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index 2992cb854e12..588d7da5b17e 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -451,8 +451,8 @@ nfs_idmap_new(struct nfs_client *clp)
451 return error; 451 return error;
452 } 452 }
453 453
454 if (clp->cl_rpcclient->cl_path.dentry) 454 if (clp->cl_rpcclient->cl_dentry)
455 pipe->dentry = rpc_mkpipe_dentry(clp->cl_rpcclient->cl_path.dentry, 455 pipe->dentry = rpc_mkpipe_dentry(clp->cl_rpcclient->cl_dentry,
456 "idmap", idmap, pipe); 456 "idmap", idmap, pipe);
457 if (IS_ERR(pipe->dentry)) { 457 if (IS_ERR(pipe->dentry)) {
458 error = PTR_ERR(pipe->dentry); 458 error = PTR_ERR(pipe->dentry);
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index 2c5993a17c33..bfd61852b718 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -57,7 +57,7 @@ struct rpc_clnt {
57 57
58 int cl_nodelen; /* nodename length */ 58 int cl_nodelen; /* nodename length */
59 char cl_nodename[UNX_MAXNODENAME]; 59 char cl_nodename[UNX_MAXNODENAME];
60 struct path cl_path; 60 struct dentry * cl_dentry;
61 struct rpc_clnt * cl_parent; /* Points to parent of clones */ 61 struct rpc_clnt * cl_parent; /* Points to parent of clones */
62 struct rpc_rtt cl_rtt_default; 62 struct rpc_rtt cl_rtt_default;
63 struct rpc_timeout cl_timeout_default; 63 struct rpc_timeout cl_timeout_default;
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 9da2d837b512..5ebb602cabe0 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -777,12 +777,12 @@ static int gss_pipes_dentries_create(struct rpc_auth *auth)
777 gss_auth = container_of(auth, struct gss_auth, rpc_auth); 777 gss_auth = container_of(auth, struct gss_auth, rpc_auth);
778 clnt = gss_auth->client; 778 clnt = gss_auth->client;
779 779
780 gss_auth->pipe[1]->dentry = rpc_mkpipe_dentry(clnt->cl_path.dentry, 780 gss_auth->pipe[1]->dentry = rpc_mkpipe_dentry(clnt->cl_dentry,
781 "gssd", 781 "gssd",
782 clnt, gss_auth->pipe[1]); 782 clnt, gss_auth->pipe[1]);
783 if (IS_ERR(gss_auth->pipe[1]->dentry)) 783 if (IS_ERR(gss_auth->pipe[1]->dentry))
784 return PTR_ERR(gss_auth->pipe[1]->dentry); 784 return PTR_ERR(gss_auth->pipe[1]->dentry);
785 gss_auth->pipe[0]->dentry = rpc_mkpipe_dentry(clnt->cl_path.dentry, 785 gss_auth->pipe[0]->dentry = rpc_mkpipe_dentry(clnt->cl_dentry,
786 gss_auth->mech->gm_name, 786 gss_auth->mech->gm_name,
787 clnt, gss_auth->pipe[0]); 787 clnt, gss_auth->pipe[0]);
788 if (IS_ERR(gss_auth->pipe[0]->dentry)) { 788 if (IS_ERR(gss_auth->pipe[0]->dentry)) {
@@ -804,7 +804,7 @@ static void gss_pipes_dentries_destroy_net(struct rpc_clnt *clnt,
804 804
805 sb = rpc_get_sb_net(net); 805 sb = rpc_get_sb_net(net);
806 if (sb) { 806 if (sb) {
807 if (clnt->cl_path.dentry) 807 if (clnt->cl_dentry)
808 gss_pipes_dentries_destroy(auth); 808 gss_pipes_dentries_destroy(auth);
809 rpc_put_sb_net(net); 809 rpc_put_sb_net(net);
810 } 810 }
@@ -819,7 +819,7 @@ static int gss_pipes_dentries_create_net(struct rpc_clnt *clnt,
819 819
820 sb = rpc_get_sb_net(net); 820 sb = rpc_get_sb_net(net);
821 if (sb) { 821 if (sb) {
822 if (clnt->cl_path.dentry) 822 if (clnt->cl_dentry)
823 err = gss_pipes_dentries_create(auth); 823 err = gss_pipes_dentries_create(auth);
824 rpc_put_sb_net(net); 824 rpc_put_sb_net(net);
825 } 825 }
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index e3ced3061212..ed7c22de9319 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -98,12 +98,12 @@ static void rpc_unregister_client(struct rpc_clnt *clnt)
98 98
99static void __rpc_clnt_remove_pipedir(struct rpc_clnt *clnt) 99static void __rpc_clnt_remove_pipedir(struct rpc_clnt *clnt)
100{ 100{
101 if (clnt->cl_path.dentry) { 101 if (clnt->cl_dentry) {
102 if (clnt->cl_auth && clnt->cl_auth->au_ops->pipes_destroy) 102 if (clnt->cl_auth && clnt->cl_auth->au_ops->pipes_destroy)
103 clnt->cl_auth->au_ops->pipes_destroy(clnt->cl_auth); 103 clnt->cl_auth->au_ops->pipes_destroy(clnt->cl_auth);
104 rpc_remove_client_dir(clnt->cl_path.dentry); 104 rpc_remove_client_dir(clnt->cl_dentry);
105 } 105 }
106 clnt->cl_path.dentry = NULL; 106 clnt->cl_dentry = NULL;
107} 107}
108 108
109static void rpc_clnt_remove_pipedir(struct rpc_clnt *clnt) 109static void rpc_clnt_remove_pipedir(struct rpc_clnt *clnt)
@@ -154,20 +154,19 @@ static int
154rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name) 154rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name)
155{ 155{
156 struct super_block *pipefs_sb; 156 struct super_block *pipefs_sb;
157 struct path path; 157 struct dentry *dentry;
158 158
159 clnt->cl_path.mnt = ERR_PTR(-ENOENT); 159 clnt->cl_dentry = NULL;
160 clnt->cl_path.dentry = NULL;
161 if (dir_name == NULL) 160 if (dir_name == NULL)
162 return 0; 161 return 0;
163 pipefs_sb = rpc_get_sb_net(clnt->cl_xprt->xprt_net); 162 pipefs_sb = rpc_get_sb_net(clnt->cl_xprt->xprt_net);
164 if (!pipefs_sb) 163 if (!pipefs_sb)
165 return 0; 164 return 0;
166 path.dentry = rpc_setup_pipedir_sb(pipefs_sb, clnt, dir_name); 165 dentry = rpc_setup_pipedir_sb(pipefs_sb, clnt, dir_name);
167 rpc_put_sb_net(clnt->cl_xprt->xprt_net); 166 rpc_put_sb_net(clnt->cl_xprt->xprt_net);
168 if (IS_ERR(path.dentry)) 167 if (IS_ERR(dentry))
169 return PTR_ERR(path.dentry); 168 return PTR_ERR(dentry);
170 clnt->cl_path = path; 169 clnt->cl_dentry = dentry;
171 return 0; 170 return 0;
172} 171}
173 172
@@ -186,7 +185,7 @@ static int __rpc_pipefs_event(struct rpc_clnt *clnt, unsigned long event,
186 BUG_ON(dentry == NULL); 185 BUG_ON(dentry == NULL);
187 if (IS_ERR(dentry)) 186 if (IS_ERR(dentry))
188 return PTR_ERR(dentry); 187 return PTR_ERR(dentry);
189 clnt->cl_path.dentry = dentry; 188 clnt->cl_dentry = dentry;
190 if (clnt->cl_auth->au_ops->pipes_create) { 189 if (clnt->cl_auth->au_ops->pipes_create) {
191 err = clnt->cl_auth->au_ops->pipes_create(clnt->cl_auth); 190 err = clnt->cl_auth->au_ops->pipes_create(clnt->cl_auth);
192 if (err) 191 if (err)