summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-10-04 17:01:54 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-17 19:47:04 +0100
commit04b173066116b523c8bc5957e4e105865b3f7a33 (patch)
tree0385819e4c22b03f18932141d155fa0620be0633 /fs
parent02d72fbeeae5b5d36da28462acd9698edccbb9b2 (diff)
downloadlinux-rt-04b173066116b523c8bc5957e4e105865b3f7a33.tar.gz
NFSv2: Fix a typo in encode_sattr()
commit ad97a995d8edff820d4238bd0dfc69f440031ae6 upstream. Encode the mtime correctly. Fixes: 95582b0083883 ("vfs: change inode times to use struct timespec64") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs2xdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c
index 350675e3ed47..040a05f0e61e 100644
--- a/fs/nfs/nfs2xdr.c
+++ b/fs/nfs/nfs2xdr.c
@@ -385,7 +385,7 @@ static void encode_sattr(struct xdr_stream *xdr, const struct iattr *attr)
} else
p = xdr_time_not_set(p);
if (attr->ia_valid & ATTR_MTIME_SET) {
- ts = timespec64_to_timespec(attr->ia_atime);
+ ts = timespec64_to_timespec(attr->ia_mtime);
xdr_encode_time(p, &ts);
} else if (attr->ia_valid & ATTR_MTIME) {
ts = timespec64_to_timespec(attr->ia_mtime);