]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.32.17/nfsv4-fix-an-embarassing-typo-in-encode_attrs.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.32.17 / nfsv4-fix-an-embarassing-typo-in-encode_attrs.patch
CommitLineData
a0402406
GKH
1From d3f6baaa34c54040b3ef30950e59b54ac0624b21 Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <Trond.Myklebust@netapp.com>
3Date: Tue, 22 Jun 2010 08:52:39 -0400
4Subject: NFSv4: Fix an embarassing typo in encode_attrs()
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9From: Trond Myklebust <Trond.Myklebust@netapp.com>
10
11commit d3f6baaa34c54040b3ef30950e59b54ac0624b21 upstream.
12
13Apparently, we have never been able to set the atime correctly from the
14NFSv4 client.
15
16Reported-by: 小倉一夫 <ka-ogura@bd6.so-net.ne.jp>
17Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19
20---
21 fs/nfs/nfs4xdr.c | 4 ++--
22 1 file changed, 2 insertions(+), 2 deletions(-)
23
24--- a/fs/nfs/nfs4xdr.c
25+++ b/fs/nfs/nfs4xdr.c
26@@ -840,8 +840,8 @@ static void encode_attrs(struct xdr_stre
27 bmval1 |= FATTR4_WORD1_TIME_ACCESS_SET;
28 *p++ = cpu_to_be32(NFS4_SET_TO_CLIENT_TIME);
29 *p++ = cpu_to_be32(0);
30- *p++ = cpu_to_be32(iap->ia_mtime.tv_sec);
31- *p++ = cpu_to_be32(iap->ia_mtime.tv_nsec);
32+ *p++ = cpu_to_be32(iap->ia_atime.tv_sec);
33+ *p++ = cpu_to_be32(iap->ia_atime.tv_nsec);
34 }
35 else if (iap->ia_valid & ATTR_ATIME) {
36 bmval1 |= FATTR4_WORD1_TIME_ACCESS_SET;