Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f3cc480 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds
Browse files

NFSv4: Fix brainfart in attribute length calculation



The calculation of the attribute length was 4 bytes off.

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Tested-by: default avatarAndre Heider <a.heider@gmail.com>
Reported-and-tested-by: default avatarHenrik Rydberg <rydberg@euromail.se>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b3a3a9c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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: */