Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp417117pxu; Sun, 22 Nov 2020 13:07:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOFlSgQeqR8sdgspP8ryG620Fmo4c6mRLiHf802gRGvTAh97U+5b8Se9l6kyKtn4iidli2 X-Received: by 2002:a50:858a:: with SMTP id a10mr39013355edh.190.1606079260212; Sun, 22 Nov 2020 13:07:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606079260; cv=none; d=google.com; s=arc-20160816; b=ESh2F5uLQb4gfydMKyxYG60xBFwaLP5Q52PWdBscXO6iWxr9MdArdqhu8Sy4Hqqgg7 0qduoH57ehV9mwlY3A79WP6ml9oIXLljFHb5TLQinzX5ChycRsKu7R1865M5ZgqPw6aD 7lZuq/Pd8W1QSHL67W8DST5pt9/3WH2/XZis98Lvi6H0bMMUSdI/1yfWFw3q2WhK9Egf OBuAs+42Pbhh5AeIwqvGqOW/VzEa9BAd43BDaJaO9iwvdkv1rhO5BMAQEU4yaN1w/bI1 vF/Ba0HZKBs3XWa3oEKHcjiFvPc/2NnKyeL7H/oV0f0lq7MSkefl/lAWFHHMLE25DAhf UUeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=1ddBhKYqners6WMnukPiTvpWmLdLvSg3KrpanMFd82g=; b=u32DNi0exQg3bAMqfh2q22bgfN19i0/nmyrO9DH0PKSeY6UHmvZk2l8Ie5VWT00lpB Had3kzIEGrQ529Pj8AlA1f7JatwgMwe0yHxTJ8r+E0S5JAyA3/wwVFyYBLiwbzHWO13E fskCjBR+xaTlPDrp5ylUfSyAHGxe0cj7hXfns+v/MmsfQULe9PUSeb8OXZfdkomIPZZG BM/H6+Vh/nP1SJMqoHadlXNqe64pKwrwneX9SbSUMSio2F/CA8LTjD0IHj5cE1rE1r3k jnN5Ce6LJHzBoB4BGPLwKcZswAVhLJt3Zpesx02SUZKM0ObjEr9oFNv8vY9gJxqGPjU6 gDoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uVmEXw4x; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si5960053edy.106.2020.11.22.13.07.17; Sun, 22 Nov 2020 13:07:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uVmEXw4x; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727398AbgKVUwg (ORCPT + 99 others); Sun, 22 Nov 2020 15:52:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:57582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727418AbgKVUwg (ORCPT ); Sun, 22 Nov 2020 15:52:36 -0500 Received: from leira.hammer.space (c-68-36-133-222.hsd1.mi.comcast.net [68.36.133.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E6CF220789 for ; Sun, 22 Nov 2020 20:52:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606078356; bh=5gtozA03I7R/4JernBdR56cfYEcT9DxzMQL+zZ1AofY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uVmEXw4xNbc2hYTC4P2cY9um8Oi1nwg9vII1i+sJrdq3tpWhyv9YXKi8GVSQbaEhk +qSMC0dbWA0rA/eTy3BfL9J8Xm0D2HjLMQUdbpyW9KB8MCiKOCFEnDa4VGnYi+w/Aq eV8L35OzBvXueakmAkB8G8mUJvkWnPhJVa2j+ePs= From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH 5/8] SUNRPC: Don't truncate tail in xdr_inline_pages() Date: Sun, 22 Nov 2020 15:52:26 -0500 Message-Id: <20201122205229.3826-6-trondmy@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201122205229.3826-5-trondmy@kernel.org> References: <20201122205229.3826-1-trondmy@kernel.org> <20201122205229.3826-2-trondmy@kernel.org> <20201122205229.3826-3-trondmy@kernel.org> <20201122205229.3826-4-trondmy@kernel.org> <20201122205229.3826-5-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust True that if the length of the pages[] array is not 4-byte aligned, then we will need to store the padding in the tail, but there is no need to truncate the total buffer length here. Signed-off-by: Trond Myklebust --- net/sunrpc/xdr.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 3ce0a5daa9eb..5a450055469f 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c @@ -193,9 +193,6 @@ xdr_inline_pages(struct xdr_buf *xdr, unsigned int offset, tail->iov_base = buf + offset; tail->iov_len = buflen - offset; - if ((xdr->page_len & 3) == 0) - tail->iov_len -= sizeof(__be32); - xdr->buflen += len; } EXPORT_SYMBOL_GPL(xdr_inline_pages); -- 2.28.0