mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
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>
This commit is contained in:
parent
b3a3a9c441
commit
4f3cc4809a
@ -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: */
|
||||
|
Loading…
Reference in New Issue
Block a user