Skip to content

Commit 57cd207

Browse files
author
Al Viro
committed
mount_setattr(2): don't mess with LOOKUP_EMPTY
just use CLASS(filename_uflags) + filename_lookup() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 70772ca commit 57cd207

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

fs/namespace.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4978,8 +4978,6 @@ SYSCALL_DEFINE5(mount_setattr, int, dfd, const char __user *, path,
49784978
lookup_flags &= ~LOOKUP_AUTOMOUNT;
49794979
if (flags & AT_SYMLINK_NOFOLLOW)
49804980
lookup_flags &= ~LOOKUP_FOLLOW;
4981-
if (flags & AT_EMPTY_PATH)
4982-
lookup_flags |= LOOKUP_EMPTY;
49834981

49844982
kattr = (struct mount_kattr) {
49854983
.lookup_flags = lookup_flags,
@@ -4992,7 +4990,8 @@ SYSCALL_DEFINE5(mount_setattr, int, dfd, const char __user *, path,
49924990
if (err <= 0)
49934991
return err;
49944992

4995-
err = user_path_at(dfd, path, kattr.lookup_flags, &target);
4993+
CLASS(filename_uflags, name)(path, flags);
4994+
err = filename_lookup(dfd, name, kattr.lookup_flags, &target, NULL);
49964995
if (!err) {
49974996
err = do_mount_setattr(&target, &kattr);
49984997
path_put(&target);

0 commit comments

Comments
 (0)