]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
kill getname_statx_lookup_flags()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 20 Sep 2024 04:38:59 +0000 (00:38 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 13 Nov 2024 16:45:22 +0000 (11:45 -0500)
LOOKUP_EMPTY is ignored by the only remaining user, and without
that 'getname_' prefix makes no sense.

Remove LOOKUP_EMPTY part, rename to statx_lookup_flags() and make
static.  It most likely is _not_ statx() specific, either, but
that's the next step.

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/internal.h
fs/stat.c

index 8c1b7acbbe8faadef678e5aa2dc3588a0d8140b1..8cf42b327e5ed122b1e19e4ba5ecdfbe6ad11581 100644 (file)
@@ -246,7 +246,6 @@ int open_namespace(struct ns_common *ns);
  * fs/stat.c:
  */
 
-int getname_statx_lookup_flags(int flags);
 int do_statx(int dfd, struct filename *filename, unsigned int flags,
             unsigned int mask, struct statx __user *buffer);
 int do_statx_fd(int fd, unsigned int flags, unsigned int mask,
index b74831dc7ae635efaf55f83d621b306995ae7e0d..4e8698fa932f8471fadc01d0ca8440a2dc23dec7 100644 (file)
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -231,7 +231,7 @@ int vfs_fstat(int fd, struct kstat *stat)
        return error;
 }
 
-int getname_statx_lookup_flags(int flags)
+static int statx_lookup_flags(int flags)
 {
        int lookup_flags = 0;
 
@@ -239,8 +239,6 @@ int getname_statx_lookup_flags(int flags)
                lookup_flags |= LOOKUP_FOLLOW;
        if (!(flags & AT_NO_AUTOMOUNT))
                lookup_flags |= LOOKUP_AUTOMOUNT;
-       if (flags & AT_EMPTY_PATH)
-               lookup_flags |= LOOKUP_EMPTY;
 
        return lookup_flags;
 }
@@ -301,7 +299,7 @@ static int vfs_statx(int dfd, struct filename *filename, int flags,
              struct kstat *stat, u32 request_mask)
 {
        struct path path;
-       unsigned int lookup_flags = getname_statx_lookup_flags(flags);
+       unsigned int lookup_flags = statx_lookup_flags(flags);
        int error;
 
        if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT | AT_EMPTY_PATH |