Commit 04b17306 authored by Trond Myklebust's avatar Trond Myklebust Committed by Greg Kroah-Hartman

NFSv2: Fix a typo in encode_sattr()

commit ad97a995 upstream.

Encode the mtime correctly.

Fixes: 95582b00 ("vfs: change inode times to use struct timespec64")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 02d72fbe
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment