]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFSv4: Fix an embarassing typo in encode_attrs()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 22 Jun 2010 12:52:39 +0000 (08:52 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:26:30 +0000 (10:26 -0700)
commit d3f6baaa34c54040b3ef30950e59b54ac0624b21 upstream.

Apparently, we have never been able to set the atime correctly from the
NFSv4 client.

Reported-by: 小倉一夫 <ka-ogura@bd6.so-net.ne.jp>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/nfs/nfs4xdr.c

index 5cd5184b56dbad12a8e204ecd22adcb94c3dadf1..d741e0e3bce59fdfa3122247b1fdc801a0012783 100644 (file)
@@ -863,8 +863,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;