diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2024-09-20 14:08:37 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2026-01-16 12:52:03 -0500 |
| commit | 57cd2072bda9d15df427f3d38b9cab4aad3cb55f (patch) | |
| tree | 2ff838e0f14525ea76ecd3776948ba8c5c811c92 | |
| parent | 70772cafff8b8f02a33a56660f84d8b4011ddeb5 (diff) | |
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>
| -rw-r--r-- | fs/namespace.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 9d0d8ed16264..d632180f9b1a 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -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); |
