1
0
Fork 0

NFSv2: Fix a typo in encode_sattr()

commit ad97a995d8 upstream.

Encode the mtime correctly.

Fixes: 95582b0083 ("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>
5.4-rM2-2.2.x-imx-squashed
Trond Myklebust 2019-10-04 17:01:54 -04:00 committed by Greg Kroah-Hartman
parent 6a0336ecaa
commit 2455e1b819
1 changed files with 1 additions and 1 deletions

View File

@ -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);