aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs2xdr.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-10-04 17:01:54 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-11-03 21:28:44 -0500
commitad97a995d8edff820d4238bd0dfc69f440031ae6 (patch)
tree2668f5168d7fa86365b760b659c8f3d7a8307f3a /fs/nfs/nfs2xdr.c
parentNFSv4: NFSv4 callbacks also support 64-bit timestamps (diff)
downloadlinux-dev-ad97a995d8edff820d4238bd0dfc69f440031ae6.tar.xz
linux-dev-ad97a995d8edff820d4238bd0dfc69f440031ae6.zip
NFSv2: Fix a typo in encode_sattr()
Encode the mtime correctly. Fixes: 95582b0083883 ("vfs: change inode times to use struct timespec64") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/nfs2xdr.c')
-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 d4e144712034..3bb386989c7d 100644
--- a/fs/nfs/nfs2xdr.c
+++ b/fs/nfs/nfs2xdr.c
@@ -370,7 +370,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);