]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
NFSv2: Fix a typo in encode_sattr()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 4 Oct 2019 21:01:54 +0000 (17:01 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 4 Nov 2019 02:28:44 +0000 (21:28 -0500)
Encode the mtime correctly.

Fixes: 95582b0083883 ("vfs: change inode times to use struct timespec64")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs2xdr.c

index d4e1447120342a0217b2a3e5072510ff7fe7cee9..3bb386989c7d0547bb54d27490d569b69883fbbe 100644 (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);