Skip to content

Commit 88a2062

Browse files
author
Al Viro
committed
kill getname_statx_lookup_flags()
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 <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 8e15e12 commit 88a2062

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

fs/internal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ int open_namespace(struct ns_common *ns);
246246
* fs/stat.c:
247247
*/
248248

249-
int getname_statx_lookup_flags(int flags);
250249
int do_statx(int dfd, struct filename *filename, unsigned int flags,
251250
unsigned int mask, struct statx __user *buffer);
252251
int do_statx_fd(int fd, unsigned int flags, unsigned int mask,

fs/stat.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,14 @@ int vfs_fstat(int fd, struct kstat *stat)
231231
return error;
232232
}
233233

234-
int getname_statx_lookup_flags(int flags)
234+
static int statx_lookup_flags(int flags)
235235
{
236236
int lookup_flags = 0;
237237

238238
if (!(flags & AT_SYMLINK_NOFOLLOW))
239239
lookup_flags |= LOOKUP_FOLLOW;
240240
if (!(flags & AT_NO_AUTOMOUNT))
241241
lookup_flags |= LOOKUP_AUTOMOUNT;
242-
if (flags & AT_EMPTY_PATH)
243-
lookup_flags |= LOOKUP_EMPTY;
244242

245243
return lookup_flags;
246244
}
@@ -301,7 +299,7 @@ static int vfs_statx(int dfd, struct filename *filename, int flags,
301299
struct kstat *stat, u32 request_mask)
302300
{
303301
struct path path;
304-
unsigned int lookup_flags = getname_statx_lookup_flags(flags);
302+
unsigned int lookup_flags = statx_lookup_flags(flags);
305303
int error;
306304

307305
if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT | AT_EMPTY_PATH |

0 commit comments

Comments
 (0)