From patchwork Mon Oct 24 11:31:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8647 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp421513wru; Mon, 24 Oct 2022 05:20:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7zMiNYqt30EA1eEKg9HoJfet3AiG9SkCsRDso6lXyhsvDP2+e1HGXB70+chBKJlw9CUAT3 X-Received: by 2002:aa7:df94:0:b0:461:aff8:d3e1 with SMTP id b20-20020aa7df94000000b00461aff8d3e1mr6435756edy.10.1666614040802; Mon, 24 Oct 2022 05:20:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666614040; cv=none; d=google.com; s=arc-20160816; b=ngRFEXJxA2KYmiJPzwEICZXqNtJQyLvw0X3qRiRt83aaLDdbTSyHKBCfL1oi1fnami qCb5SjvvVHbKpmwFl1fgHrX0/Posn5ab3sZznaTxNKt9Rz9lAPPSNyjf0EWeNHWn9ae1 +nVGD0ec9Mj14YMPG2ZXT/I+wYDpOOyoDgV/Ah2HkB58QrzcuEPoIWPgNlTi5lXituGc HLm8DVpG8fEI8xMX+yoQoJ702DmgbD10bm4mU4vJT6oHcg3DpegfjhrjdWE7bL2VmT4P NzdBG8tbTHaT4J/hzBpNjoifI5xPQW1Ay+rRPUm8lNggS+EA6WLbQUnnJEikEJ8VD6UO TGSQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=agcU8PU+am4KQipXWAsqAfuILAtcc1PC7kKsckqLgtc=; b=iQrF45CC8z6PQ2wsBvl6Szk0/AO1TBSbNJVgqeztm0KxH7yR5YtRQLCbmflLl/Vlzk c+zPAhq9k44K98tMh7x3c/JuQJi0SF08qmD13G4m7U7fuWsFR25oiXQp85Aj/vzcSdYL LKoijB6qaBe58QpOXeBmp9spWJHDWGr9m2wf7IvtP12ZIUGS+V+BzfsNDh6byFZ0oFJu c2fcjV14vlyXKVs2VQbX/dzOdFuGA22ZWVTlp6S9yKuVpIthpqeVZf8r856W2O3HfeFC M67aTeDJwikz2qCyNzNGII6Y6xnuEmkKFk0fOOreD1Km0tQzZ9csDa4aRoxmvgSf2afk Op8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WCjnAx5J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n9-20020a509349000000b00458cba4c78bsi24324022eda.416.2022.10.24.05.20.10; Mon, 24 Oct 2022 05:20:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WCjnAx5J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232963AbiJXMPc (ORCPT + 99 others); Mon, 24 Oct 2022 08:15:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232999AbiJXMNk (ORCPT ); Mon, 24 Oct 2022 08:13:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8097C2183C; Mon, 24 Oct 2022 04:54:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 05AAC612BB; Mon, 24 Oct 2022 11:54:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15D75C433C1; Mon, 24 Oct 2022 11:54:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612457; bh=yxPrtX9CbNfBgVgzqmzwqBKqwbTagH6YcualEdEN0T4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WCjnAx5JRYLWC8a16w0fHq8QfEX/9yUoYNr2FrQbx8uIWKaMyMTGA3cP1MEpTB+nn jt0RQYJgWTRLA+8MSFBPP0boRt2fQhkR1mPK7B/Kk8JZspHVsiSHPDVix20mBS2WMb rSWyg05JHMxWsZzQ1TmbXVFHd1QlR1RdM/brvS/w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anna Schumaker , Chuck Lever , Sasha Levin Subject: [PATCH 4.14 166/210] NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data Date: Mon, 24 Oct 2022 13:31:23 +0200 Message-Id: <20221024113002.349900124@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747571484252068887?= X-GMAIL-MSGID: =?utf-8?q?1747571484252068887?= From: Anna Schumaker [ Upstream commit 06981d560606ac48d61e5f4fff6738b925c93173 ] This was discussed with Chuck as part of this patch set. Returning nfserr_resource was decided to not be the best error message here, and he suggested changing to nfserr_serverfault instead. Signed-off-by: Anna Schumaker Link: https://lore.kernel.org/linux-nfs/20220907195259.926736-1-anna@kernel.org/T/#t Signed-off-by: Chuck Lever Signed-off-by: Sasha Levin --- fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 2e7349b2dd4d..c5c10b7dc63e 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3550,7 +3550,7 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr, if (resp->xdr.buf->page_len && test_bit(RQ_SPLICE_OK, &resp->rqstp->rq_flags)) { WARN_ON_ONCE(1); - return nfserr_resource; + return nfserr_serverfault; } xdr_commit_encode(xdr);