summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-10-05 00:01:54 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-17 21:48:47 +0300
commit2455e1b8199c489b58df3710e4be4051a3692b9a (patch)
tree90fde1a428cf15fb43e3cdfefe45491fb169e6a8 /fs/nfs
parent6a0336ecaa42ea3d09168930be5bc914b3d6a4ed (diff)
downloadlinux-2455e1b8199c489b58df3710e4be4051a3692b9a.tar.xz
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/nfs')
-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 cbc17a203248..887f9136a9db 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);