diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-07-23 18:53:39 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-23 23:24:59 +0200 |
commit | 4f3cc4809a98a165a9708b72b47de71643797bbd (patch) | |
tree | fa1db465f6c74786457d81343be9cdaa9f824921 /fs/nfs/nfs4xdr.c | |
parent | Merge tag 'trace-3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/r... (diff) | |
download | linux-4f3cc4809a98a165a9708b72b47de71643797bbd.tar.xz linux-4f3cc4809a98a165a9708b72b47de71643797bbd.zip |
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 '')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 2 |
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, len, ((char *)p - (char *)q) + 4); BUG(); } - len = (char *)p - (char *)q - (bmval_len << 2); *q++ = htonl(bmval0); *q++ = htonl(bmval1); if (bmval_len == 3) *q++ = htonl(bmval2); + len = (char *)p - (char *)(q + 1); *q = htonl(len); /* out: */ |