Skip to content

Commit

Permalink
NFSv2: Fix a typo in encode_sattr()
Browse files Browse the repository at this point in the history
Encode the mtime correctly.

Fixes: 95582b0 ("vfs: change inode times to use struct timespec64")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
Trond Myklebust committed Nov 4, 2019
1 parent 7d34ff5 commit ad97a99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/nfs2xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ad97a99

Please sign in to comment.