diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2020-01-11 22:52:26 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-03-13 21:08:17 -0400 |
commit | 161aff1d93abf0e5b5e9dbca88928998c155f677 (patch) | |
tree | 89d39d7e332ca69cd7b88026a406009fe0b210b9 /fs/namespace.c | |
parent | cbae4d12eeee6b002a1252c4c45213651e8f4b55 (diff) | |
download | linux-161aff1d93abf0e5b5e9dbca88928998c155f677.tar.gz linux-161aff1d93abf0e5b5e9dbca88928998c155f677.tar.bz2 linux-161aff1d93abf0e5b5e9dbca88928998c155f677.zip |
LOOKUP_MOUNTPOINT: fold path_mountpointat() into path_lookupat()
New LOOKUP flag, telling path_lookupat() to act as path_mountpointat().
IOW, traverse mounts at the final point and skip revalidation of the
location where it ends up.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 743980380a8f..a28e4db075ed 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1669,7 +1669,7 @@ int ksys_umount(char __user *name, int flags) struct path path; struct mount *mnt; int retval; - int lookup_flags = 0; + int lookup_flags = LOOKUP_MOUNTPOINT; if (flags & ~(MNT_FORCE | MNT_DETACH | MNT_EXPIRE | UMOUNT_NOFOLLOW)) return -EINVAL; @@ -1680,7 +1680,7 @@ int ksys_umount(char __user *name, int flags) if (!(flags & UMOUNT_NOFOLLOW)) lookup_flags |= LOOKUP_FOLLOW; - retval = user_path_mountpoint_at(AT_FDCWD, name, lookup_flags, &path); + retval = user_path_at(AT_FDCWD, name, lookup_flags, &path); if (retval) goto out; mnt = real_mount(path.mnt); |