diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-07-14 08:43:54 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-07-14 09:02:28 -0400 |
commit | a95e691f9c4a6e24fdeab6d7feae6d5411fe8a69 (patch) | |
tree | ebe142c51935b977861e9d911a505bc63ef8ee29 /net/sunrpc/clnt.c | |
parent | e9a17bd73a29e5323c37ec5ffe50fc0e825d3d03 (diff) |
rpc_create_*_dir: don't bother with qstr
just pass the name
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 5a750b9c3640..26456274b24e 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -128,9 +128,7 @@ static struct dentry *rpc_setup_pipedir_sb(struct super_block *sb, | |||
128 | { | 128 | { |
129 | static uint32_t clntid; | 129 | static uint32_t clntid; |
130 | char name[15]; | 130 | char name[15]; |
131 | struct qstr q = { .name = name }; | ||
132 | struct dentry *dir, *dentry; | 131 | struct dentry *dir, *dentry; |
133 | int error; | ||
134 | 132 | ||
135 | dir = rpc_d_lookup_sb(sb, dir_name); | 133 | dir = rpc_d_lookup_sb(sb, dir_name); |
136 | if (dir == NULL) { | 134 | if (dir == NULL) { |
@@ -138,19 +136,17 @@ static struct dentry *rpc_setup_pipedir_sb(struct super_block *sb, | |||
138 | return dir; | 136 | return dir; |
139 | } | 137 | } |
140 | for (;;) { | 138 | for (;;) { |
141 | q.len = snprintf(name, sizeof(name), "clnt%x", (unsigned int)clntid++); | 139 | snprintf(name, sizeof(name), "clnt%x", (unsigned int)clntid++); |
142 | name[sizeof(name) - 1] = '\0'; | 140 | name[sizeof(name) - 1] = '\0'; |
143 | q.hash = full_name_hash(q.name, q.len); | 141 | dentry = rpc_create_client_dir(dir, name, clnt); |
144 | dentry = rpc_create_client_dir(dir, &q, clnt); | ||
145 | if (!IS_ERR(dentry)) | 142 | if (!IS_ERR(dentry)) |
146 | break; | 143 | break; |
147 | error = PTR_ERR(dentry); | 144 | if (dentry == ERR_PTR(-EEXIST)) |
148 | if (error != -EEXIST) { | 145 | continue; |
149 | printk(KERN_INFO "RPC: Couldn't create pipefs entry" | 146 | printk(KERN_INFO "RPC: Couldn't create pipefs entry" |
150 | " %s/%s, error %d\n", | 147 | " %s/%s, error %ld\n", |
151 | dir_name, name, error); | 148 | dir_name, name, PTR_ERR(dentry)); |
152 | break; | 149 | break; |
153 | } | ||
154 | } | 150 | } |
155 | dput(dir); | 151 | dput(dir); |
156 | return dentry; | 152 | return dentry; |