diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-02-22 19:44:00 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-24 17:19:15 -0400 |
commit | 668696dcbb1b184f8758ba9903c373c4960174a9 (patch) | |
tree | 3b3e36efabb4ac41312afa5f18cbefe9a6ced335 /fs | |
parent | 5eb6b495c60ef865324a81898eeb18062fd81662 (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.c | 21 |
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 | */ |
2339 | static int | 2339 | static int |
2340 | path_mountpoint(int dfd, const char *name, struct path *path, unsigned int flags) | 2340 | path_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 | ||
2368 | static int | 2369 | static int |
2369 | filename_mountpoint(int dfd, struct filename *s, struct path *path, | 2370 | filename_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 | ||