Skip to content

Commit

Permalink
nfs: don't report STATX_BTIME in ->getattr
Browse files Browse the repository at this point in the history
commit cded49b upstream.

NFS doesn't properly support reporting the btime in getattr (yet), but
61a968b mistakenly added it to the request_mask. This causes statx
for STATX_BTIME to report a zeroed out btime instead of properly
clearing the flag.

Cc: stable@vger.kernel.org # v6.3+
Fixes: 61a968b ("nfs: report the inode version in getattr if requested")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2214134
Reported-by: Boyang Xue <bxue@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
jtlayton authored and gregkh committed Jul 5, 2023
1 parent bbfc014 commit 4ff8831
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ int nfs_getattr(struct mnt_idmap *idmap, const struct path *path,

request_mask &= STATX_TYPE | STATX_MODE | STATX_NLINK | STATX_UID |
STATX_GID | STATX_ATIME | STATX_MTIME | STATX_CTIME |
STATX_INO | STATX_SIZE | STATX_BLOCKS | STATX_BTIME |
STATX_INO | STATX_SIZE | STATX_BLOCKS |
STATX_CHANGE_COOKIE;

if ((query_flags & AT_STATX_DONT_SYNC) && !force_sync) {
Expand Down

0 comments on commit 4ff8831

Please sign in to comment.