diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-03-25 15:59:53 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-04-12 17:14:17 -0400 |
commit | 4eb6a8230b589eb2bb02c4ce7418032552ef6470 (patch) | |
tree | 9da76d7bec10445c1da6163d3bf585a20182ac6e | |
parent | 8a27c7ccca3b0df83f13c591f58d68b057b67780 (diff) |
NFS: Mask out unsupported attributes in nfs_getattr()
We don't currently support STATX_BTIME, so don't advertise it in the
return values for nfs_getattr().
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
-rw-r--r-- | fs/nfs/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 8de5b3b9da91..c429a5375b92 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -815,6 +815,10 @@ int nfs_getattr(struct user_namespace *mnt_userns, const struct path *path, trace_nfs_getattr_enter(inode); + request_mask &= STATX_TYPE | STATX_MODE | STATX_NLINK | STATX_UID | + STATX_GID | STATX_ATIME | STATX_MTIME | STATX_CTIME | + STATX_INO | STATX_SIZE | STATX_BLOCKS; + if ((query_flags & AT_STATX_DONT_SYNC) && !force_sync) { nfs_readdirplus_parent_cache_hit(path->dentry); goto out_no_update; |