Skip to content

Commit f2d077f

Browse files
Christoph HellwigAl Viro
authored andcommitted
fs: remove KSTAT_QUERY_FLAGS
KSTAT_QUERY_FLAGS expands to AT_STATX_SYNC_TYPE, which itself already is a mask. Remove the double name, especially given that the prefix is a little confusing vs the normal AT_* flags. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent b3f0515 commit f2d077f

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

fs/stat.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ EXPORT_SYMBOL(generic_fillattr);
5656
* @path: file to get attributes from
5757
* @stat: structure to return attributes in
5858
* @request_mask: STATX_xxx flags indicating what the caller wants
59-
* @query_flags: Query mode (KSTAT_QUERY_FLAGS)
59+
* @query_flags: Query mode (AT_STATX_SYNC_TYPE)
6060
*
6161
* Get attributes without calling security_inode_getattr.
6262
*
@@ -71,7 +71,7 @@ int vfs_getattr_nosec(const struct path *path, struct kstat *stat,
7171

7272
memset(stat, 0, sizeof(*stat));
7373
stat->result_mask |= STATX_BASIC_STATS;
74-
query_flags &= KSTAT_QUERY_FLAGS;
74+
query_flags &= AT_STATX_SYNC_TYPE;
7575

7676
/* allow the fs to override these if it really wants to */
7777
/* SB_NOATIME means filesystem supplies dummy atime value */
@@ -97,7 +97,7 @@ EXPORT_SYMBOL(vfs_getattr_nosec);
9797
* @path: The file of interest
9898
* @stat: Where to return the statistics
9999
* @request_mask: STATX_xxx flags indicating what the caller wants
100-
* @query_flags: Query mode (KSTAT_QUERY_FLAGS)
100+
* @query_flags: Query mode (AT_STATX_SYNC_TYPE)
101101
*
102102
* Ask the filesystem for a file's attributes. The caller must indicate in
103103
* request_mask and query_flags to indicate what they want.
@@ -171,7 +171,7 @@ static int vfs_statx(int dfd, const char __user *filename, int flags,
171171
int error;
172172

173173
if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT | AT_EMPTY_PATH |
174-
KSTAT_QUERY_FLAGS))
174+
AT_STATX_SYNC_TYPE))
175175
return -EINVAL;
176176

177177
if (!(flags & AT_SYMLINK_NOFOLLOW))

include/linux/stat.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
#include <linux/time.h>
2020
#include <linux/uidgid.h>
2121

22-
#define KSTAT_QUERY_FLAGS (AT_STATX_SYNC_TYPE)
23-
2422
struct kstat {
2523
u32 result_mask; /* What fields the user got */
2624
umode_t mode;

0 commit comments

Comments
 (0)