]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
acl trouble after upgrading ubuntu
authorJ. Bruce Fields <bfields@fieldses.org>
Thu, 3 Dec 2009 13:10:17 +0000 (08:10 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 17:20:35 +0000 (10:20 -0700)
commit d327cf7449e6fd5cbac784c641770e9366faa386 upstream.

Subject: nfs: fix acl decoding

Commit 28f566942c6b1d929f5e240e69e7081b77b238d3 "NFS: use dynamically
computed compound_hdr.replen for xdr_inline_pages offset" accidentally
changed the amount of space to allow for the acl reply, resulting in an
IO error on attempts to get an acl.

Reported-by: Paul Rudin <paul@rudin.co.uk>
Cc: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/nfs/nfs4xdr.c

index 5ec74cd5402cea6ad9a7928d651d9efd94db21ac..e81b2bf67c42ee980371dcd3b73916bbdef82312 100644 (file)
@@ -2096,7 +2096,7 @@ nfs4_xdr_enc_getacl(struct rpc_rqst *req, __be32 *p,
        encode_compound_hdr(&xdr, req, &hdr);
        encode_sequence(&xdr, &args->seq_args, &hdr);
        encode_putfh(&xdr, args->fh, &hdr);
-       replen = hdr.replen + nfs4_fattr_bitmap_maxsz + 1;
+       replen = hdr.replen + op_decode_hdr_maxsz + nfs4_fattr_bitmap_maxsz + 1;
        encode_getattr_two(&xdr, FATTR4_WORD0_ACL, 0, &hdr);
 
        xdr_inline_pages(&req->rq_rcv_buf, replen << 2,