aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-07-23 12:53:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-23 17:24:59 -0400
commit4f3cc4809a98a165a9708b72b47de71643797bbd (patch)
treefa1db465f6c74786457d81343be9cdaa9f824921 /fs
parentb3a3a9c441e2c8f6b6760de9331023a7906a4ac6 (diff)
NFSv4: Fix brainfart in attribute length calculation
The calculation of the attribute length was 4 bytes off. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Tested-by: Andre Heider <a.heider@gmail.com> Reported-and-tested-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4xdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index c74d6168db99..3850b018815f 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1118,11 +1118,11 @@ static void encode_attrs(struct xdr_stream *xdr, const struct iattr *iap,
1118 len, ((char *)p - (char *)q) + 4); 1118 len, ((char *)p - (char *)q) + 4);
1119 BUG(); 1119 BUG();
1120 } 1120 }
1121 len = (char *)p - (char *)q - (bmval_len << 2);
1122 *q++ = htonl(bmval0); 1121 *q++ = htonl(bmval0);
1123 *q++ = htonl(bmval1); 1122 *q++ = htonl(bmval1);
1124 if (bmval_len == 3) 1123 if (bmval_len == 3)
1125 *q++ = htonl(bmval2); 1124 *q++ = htonl(bmval2);
1125 len = (char *)p - (char *)(q + 1);
1126 *q = htonl(len); 1126 *q = htonl(len);
1127 1127
1128/* out: */ 1128/* out: */