From patchwork Thu Feb 23 19:53:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Fields X-Patchwork-Id: 9588899 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8FAF7604A2 for ; Thu, 23 Feb 2017 19:53:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7ABEF28428 for ; Thu, 23 Feb 2017 19:53:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DC0728589; Thu, 23 Feb 2017 19:53:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 148F028428 for ; Thu, 23 Feb 2017 19:53:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751041AbdBWTxm (ORCPT ); Thu, 23 Feb 2017 14:53:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41722 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750828AbdBWTxl (ORCPT ); Thu, 23 Feb 2017 14:53:41 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E20C583F44; Thu, 23 Feb 2017 19:53:41 +0000 (UTC) Received: from parsley.fieldses.org (ovpn-123-71.rdu2.redhat.com [10.10.123.71] (may be forged)) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1NJrfbi009253; Thu, 23 Feb 2017 14:53:41 -0500 Received: by parsley.fieldses.org (Postfix, from userid 2815) id 597FD1800A4; Thu, 23 Feb 2017 14:53:39 -0500 (EST) Date: Thu, 23 Feb 2017 14:53:39 -0500 From: "J. Bruce Fields" To: Anna Schumaker Cc: Weston Andros Adamson , Trond Myklebust , Anna Schumaker , linux-nfs list , Andreas Gruenbacher , Weston Andros Adamson Subject: [PATCH 1/2] NFSv4: fix getacl head length estimation Message-ID: <20170223195338.GG9417@parsley.fieldses.org> References: <1487470070-32358-1-git-send-email-bfields@redhat.com> <1487470070-32358-3-git-send-email-bfields@redhat.com> <261D4020-D9E4-4F1E-81CF-11EAAEABA684@primarydata.com> <20170222223656.GG24122@parsley.fieldses.org> <6606b2d5-719f-9e27-6f95-eec8cebfb1a8@gmail.com> <20170223194321.GF9417@parsley.fieldses.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170223194321.GF9417@parsley.fieldses.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 23 Feb 2017 19:53:42 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "J. Bruce Fields" Bitmap and attrlen follow immediately after the op reply header. This was an oversight from commit bf118a342f. Consequences of this are just minor efficiency (extra calls to xdr_shrink_bufhead). Fixes: bf118a342f10 "NFSv4: include bitmap in nfsv4 get acl data" Reviewed-by: Kinglong Mee Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields --- fs/nfs/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index e9255cb453e6..bb95dd2edeef 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -2524,7 +2524,7 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr, encode_compound_hdr(xdr, req, &hdr); encode_sequence(xdr, &args->seq_args, &hdr); encode_putfh(xdr, args->fh, &hdr); - replen = hdr.replen + op_decode_hdr_maxsz + 1; + replen = hdr.replen + op_decode_hdr_maxsz; encode_getattr_two(xdr, FATTR4_WORD0_ACL, 0, &hdr); xdr_inline_pages(&req->rq_rcv_buf, replen << 2,