From: Trond Myklebust Date: Tue, 22 Jun 2010 12:52:39 +0000 (-0400) Subject: NFSv4: Fix an embarassing typo in encode_attrs() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d3f6baaa34c54040b3ef30950e59b54ac0624b21;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git NFSv4: Fix an embarassing typo in encode_attrs() Apparently, we have never been able to set the atime correctly from the NFSv4 client. Reported-by: 小倉一夫 Signed-off-by: Trond Myklebust Cc: stable@kernel.org --- diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 6bdef28efa33..65c8dae4b267 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -862,8 +862,8 @@ static void encode_attrs(struct xdr_stream *xdr, const struct iattr *iap, const bmval1 |= FATTR4_WORD1_TIME_ACCESS_SET; *p++ = cpu_to_be32(NFS4_SET_TO_CLIENT_TIME); *p++ = cpu_to_be32(0); - *p++ = cpu_to_be32(iap->ia_mtime.tv_sec); - *p++ = cpu_to_be32(iap->ia_mtime.tv_nsec); + *p++ = cpu_to_be32(iap->ia_atime.tv_sec); + *p++ = cpu_to_be32(iap->ia_atime.tv_nsec); } else if (iap->ia_valid & ATTR_ATIME) { bmval1 |= FATTR4_WORD1_TIME_ACCESS_SET;