mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 23:46:14 +01:00
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>
This commit is contained in:
parent
70772cafff
commit
57cd2072bd
1 changed files with 2 additions and 3 deletions
|
|
@ -4978,8 +4978,6 @@ SYSCALL_DEFINE5(mount_setattr, int, dfd, const char __user *, path,
|
|||
lookup_flags &= ~LOOKUP_AUTOMOUNT;
|
||||
if (flags & AT_SYMLINK_NOFOLLOW)
|
||||
lookup_flags &= ~LOOKUP_FOLLOW;
|
||||
if (flags & AT_EMPTY_PATH)
|
||||
lookup_flags |= LOOKUP_EMPTY;
|
||||
|
||||
kattr = (struct mount_kattr) {
|
||||
.lookup_flags = lookup_flags,
|
||||
|
|
@ -4992,7 +4990,8 @@ SYSCALL_DEFINE5(mount_setattr, int, dfd, const char __user *, path,
|
|||
if (err <= 0)
|
||||
return err;
|
||||
|
||||
err = user_path_at(dfd, path, kattr.lookup_flags, &target);
|
||||
CLASS(filename_uflags, name)(path, flags);
|
||||
err = filename_lookup(dfd, name, kattr.lookup_flags, &target, NULL);
|
||||
if (!err) {
|
||||
err = do_mount_setattr(&target, &kattr);
|
||||
path_put(&target);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue