aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-02-22 19:44:00 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2015-03-24 17:19:15 -0400
commit668696dcbb1b184f8758ba9903c373c4960174a9 (patch)
tree3b3e36efabb4ac41312afa5f18cbefe9a6ced335 /fs
parent5eb6b495c60ef865324a81898eeb18062fd81662 (diff)
switch path_mountpoint() to struct filename
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 92b1f00cc05a..e1d18522db31 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2337,12 +2337,13 @@ out:
2337 * Returns 0 and "path" will be valid on success; Returns error otherwise. 2337 * Returns 0 and "path" will be valid on success; Returns error otherwise.
2338 */ 2338 */
2339static int 2339static int
2340path_mountpoint(int dfd, const char *name, struct path *path, unsigned int flags) 2340path_mountpoint(int dfd, const struct filename *name, struct path *path,
2341 unsigned int flags)
2341{ 2342{
2342 struct nameidata nd; 2343 struct nameidata nd;
2343 int err; 2344 int err;
2344 2345
2345 err = path_init(dfd, name, flags, &nd); 2346 err = path_init(dfd, name->name, flags, &nd);
2346 if (unlikely(err)) 2347 if (unlikely(err))
2347 goto out; 2348 goto out;
2348 2349
@@ -2366,20 +2367,20 @@ out:
2366} 2367}
2367 2368
2368static int 2369static int
2369filename_mountpoint(int dfd, struct filename *s, struct path *path, 2370filename_mountpoint(int dfd, struct filename *name, struct path *path,
2370 unsigned int flags) 2371 unsigned int flags)
2371{ 2372{
2372 int error; 2373 int error;
2373 if (IS_ERR(s)) 2374 if (IS_ERR(name))
2374 return PTR_ERR(s); 2375 return PTR_ERR(name);
2375 error = path_mountpoint(dfd, s->name, path, flags | LOOKUP_RCU); 2376 error = path_mountpoint(dfd, name, path, flags | LOOKUP_RCU);
2376 if (unlikely(error == -ECHILD)) 2377 if (unlikely(error == -ECHILD))
2377 error = path_mountpoint(dfd, s->name, path, flags); 2378 error = path_mountpoint(dfd, name, path, flags);
2378 if (unlikely(error == -ESTALE)) 2379 if (unlikely(error == -ESTALE))
2379 error = path_mountpoint(dfd, s->name, path, flags | LOOKUP_REVAL); 2380 error = path_mountpoint(dfd, name, path, flags | LOOKUP_REVAL);
2380 if (likely(!error)) 2381 if (likely(!error))
2381 audit_inode(s, path->dentry, 0); 2382 audit_inode(name, path->dentry, 0);
2382 putname(s); 2383 putname(name);
2383 return error; 2384 return error;
2384} 2385}
2385 2386