From patchwork Tue May 26 15:53:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever III X-Patchwork-Id: 6483211 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A20F5C0433 for ; Tue, 26 May 2015 15:54:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C589E2038E for ; Tue, 26 May 2015 15:54:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E79D720431 for ; Tue, 26 May 2015 15:54:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932232AbbEZPx6 (ORCPT ); Tue, 26 May 2015 11:53:58 -0400 Received: from mail-qk0-f182.google.com ([209.85.220.182]:34131 "EHLO mail-qk0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754593AbbEZPx4 (ORCPT ); Tue, 26 May 2015 11:53:56 -0400 Received: by qkgx75 with SMTP id x75so92622027qkg.1; Tue, 26 May 2015 08:53:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:from:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=WXMbfe3eQ66hqYsMtH7byl98Fbd6Djyy1CjPvbKHTnA=; b=khPB8dakEKz0dD/K/Vnsk5Iqe1ZpP979aEmVtE+jHIcO2ZyZmc5x2hrvNN/GQ9r9bH bm0g3qVfxIv+pjI+JiVYlHVePdHfT3LJqs7viPuVn+Z7nm87Ooac48z67p109ZqZ0omU mv9eSFAn7rI2GD5OWNoKp17hdkGQZmeU7SlB8Mm6PpGo+DPp7ooTNrkvoj6eFh6iLaOh Xy4PXzoeyYkVsbaKHyFrHWQxM+XIyN5dGEfyduIckfLmajzbqvOcZ9cEJwzDuH/Gbrj/ yWlfTKBosX8mugLb50utCAXp+SbcE4MYIHetBOP8Ht3Vt2wJzkhWrms1kManEjuztziG 7xKQ== X-Received: by 10.229.96.138 with SMTP id h10mr36041359qcn.5.1432655635103; Tue, 26 May 2015 08:53:55 -0700 (PDT) Received: from manet.1015granger.net ([2604:8800:100:81fc:82ee:73ff:fe43:d64f]) by mx.google.com with ESMTPSA id f192sm8804084qhc.37.2015.05.26.08.53.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2015 08:53:54 -0700 (PDT) Subject: [PATCH v3 17/17] NFS: Fix size of NFSACL SETACL operations From: Chuck Lever To: Anna.Schumaker@netapp.com Cc: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org Date: Tue, 26 May 2015 11:53:52 -0400 Message-ID: <20150526155352.4542.1803.stgit@manet.1015granger.net> In-Reply-To: <20150526153926.4542.96409.stgit@manet.1015granger.net> References: <20150526153926.4542.96409.stgit@manet.1015granger.net> User-Agent: StGit/0.17.1-3-g7d0f MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When encoding the NFSACL SETACL operation, reserve just the estimated size of the ACL rather than a fixed maximum. This eliminates needless zero padding on the wire that the server ignores. Fixes: ee5dc7732bd5 ('NFS: Fix "kernel BUG at fs/nfs/nfs3xdr.c:1338!"') Signed-off-by: Chuck Lever --- fs/nfs/nfs3xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index 53852a4..9b04c2e 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c @@ -1342,7 +1342,7 @@ static void nfs3_xdr_enc_setacl3args(struct rpc_rqst *req, if (args->npages != 0) xdr_write_pages(xdr, args->pages, 0, args->len); else - xdr_reserve_space(xdr, NFS_ACL_INLINE_BUFSIZE); + xdr_reserve_space(xdr, args->len); error = nfsacl_encode(xdr->buf, base, args->inode, (args->mask & NFS_ACL) ?