aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-06-27 17:00:37 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-07-20 01:44:14 -0400
commite0a0124936171af6156b80fe8ac8799f039e767f (patch)
tree5eed31f5b5dbf43f9a4d0e14fb4f9e1f9bcfd6d0 /net
parented75e95de574c99575e5f3e1d9ca59ea8c12a9cb (diff)
switch vfs_path_lookup() to struct path
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/clnt.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 8c9141583d6f..304f403a0411 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -97,8 +97,7 @@ static int
97rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name) 97rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name)
98{ 98{
99 static uint32_t clntid; 99 static uint32_t clntid;
100 struct nameidata nd; 100 struct path path, dir;
101 struct path path;
102 char name[15]; 101 char name[15];
103 struct qstr q = { 102 struct qstr q = {
104 .name = name, 103 .name = name,
@@ -113,7 +112,7 @@ rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name)
113 path.mnt = rpc_get_mount(); 112 path.mnt = rpc_get_mount();
114 if (IS_ERR(path.mnt)) 113 if (IS_ERR(path.mnt))
115 return PTR_ERR(path.mnt); 114 return PTR_ERR(path.mnt);
116 error = vfs_path_lookup(path.mnt->mnt_root, path.mnt, dir_name, 0, &nd); 115 error = vfs_path_lookup(path.mnt->mnt_root, path.mnt, dir_name, 0, &dir);
117 if (error) 116 if (error)
118 goto err; 117 goto err;
119 118
@@ -121,7 +120,7 @@ rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name)
121 q.len = snprintf(name, sizeof(name), "clnt%x", (unsigned int)clntid++); 120 q.len = snprintf(name, sizeof(name), "clnt%x", (unsigned int)clntid++);
122 name[sizeof(name) - 1] = '\0'; 121 name[sizeof(name) - 1] = '\0';
123 q.hash = full_name_hash(q.name, q.len); 122 q.hash = full_name_hash(q.name, q.len);
124 path.dentry = rpc_create_client_dir(nd.path.dentry, &q, clnt); 123 path.dentry = rpc_create_client_dir(dir.dentry, &q, clnt);
125 if (!IS_ERR(path.dentry)) 124 if (!IS_ERR(path.dentry))
126 break; 125 break;
127 error = PTR_ERR(path.dentry); 126 error = PTR_ERR(path.dentry);
@@ -132,11 +131,11 @@ rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name)
132 goto err_path_put; 131 goto err_path_put;
133 } 132 }
134 } 133 }
135 path_put(&nd.path); 134 path_put(&dir);
136 clnt->cl_path = path; 135 clnt->cl_path = path;
137 return 0; 136 return 0;
138err_path_put: 137err_path_put:
139 path_put(&nd.path); 138 path_put(&dir);
140err: 139err:
141 rpc_put_mount(); 140 rpc_put_mount();
142 return error; 141 return error;