From patchwork Sat Oct 22 07:27:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7746 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1111136wrr; Sat, 22 Oct 2022 01:56:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5SCjqAXRj17MgsIn7dHcTdjuqViC9a1f9Av+8U3z4IcxXbXJM0BBjQS0I9F6FGy9nUlG0i X-Received: by 2002:a05:6402:350d:b0:45c:f5a2:348e with SMTP id b13-20020a056402350d00b0045cf5a2348emr21222836edd.398.1666428968300; Sat, 22 Oct 2022 01:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666428968; cv=none; d=google.com; s=arc-20160816; b=oWn9hWp0E6+pFEoq62oTP8iJjVGM07PkcaW0yXC1kZx/u/3CwMfpr2dLlEQF1QiOTk FxJHvqcEv+KoZ8STKu+oFHFbaZAeCYlCI6pvXswP0HRaT7hLIGY6Ep5nrC5AI37TLIiL oGxDKezmKwbygVHK5Swj/fFat9PGOBpl/8IaUgyE+An550ppfX4I8rnrlKshZfBPQABv 7OmisRWlczmfP/3mZ1y7kbOvt8No9iCXopbVXu1KO3QVb1dAsDOcZ1HbIwTjUukvfTKo 7TPPeUpxk6N/HdlOHUuw38sqIQKUQreKwM+HsRKhM8G+Mv5xVjwVZq6/nyP23GmCyzWW Eohg== 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=WKM/KDy08OAMH8fsCvo4Ijw+vuo6F2FZHaxIdlsxurk=; b=B34Dz/6wnziEETw+Vp0tv6FCY3nsDTc5Wb9wb2xPMnF6RiyFqsqm2XaKGAoV4bim1V /y0i7PJfnamaeZMPoMSsa4k2l26lM+TV3SG3PXlRCIX18Qy40fiFkJJ6G39TlF9anM4N G4p2vBPcHNdyGx9BWeWeNQqgQllbHbI3jSprxNzoWumd70ZOq7ehdT3HeJFhiFTPfiEY Vz5Zqc9S9G08VpSF83PbeVFglQQq4UD31WSLqG3PIwZBwFrtg99SZTYLsYGTV2woPYjR a1P6fuwzAb5fQTbcL6e/xwvBbWD1KsagfFxmaFkvwCTMVeoH2UeaKHd+YYV4c6kfGU2j 1UZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZnD9SAMA; 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 d26-20020aa7d69a000000b0046157981475si2604124edr.474.2022.10.22.01.55.42; Sat, 22 Oct 2022 01:56:08 -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=ZnD9SAMA; 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 S231806AbiJVIzT (ORCPT + 99 others); Sat, 22 Oct 2022 04:55:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234649AbiJVIxM (ORCPT ); Sat, 22 Oct 2022 04:53:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DCAE36BD6; Sat, 22 Oct 2022 01:12:39 -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 ams.source.kernel.org (Postfix) with ESMTPS id 0CB25B80E44; Sat, 22 Oct 2022 08:02:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BEDDC433C1; Sat, 22 Oct 2022 08:02:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425722; bh=QNlC+amV3gh/GGLHmqaVA+h+qe2X831HkJsJ7yTq4l0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZnD9SAMAjg/shNHNB0Zu1dMNemIQ0267Y6KOHZ2nrsIh7FknlgdzWNTBFKrRgzjrQ +kvEqIW6czeseYqOm8CjyEzFH7IyLFahY/j/T7R8jwk8hFOuTvFcWxNo9kusJDDgZU h+cJxTv0Dbehv5vBCg5uAMujQPigfCDBtrl10jvw= 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 5.19 554/717] NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data Date: Sat, 22 Oct 2022 09:27:13 +0200 Message-Id: <20221022072522.883630640@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747377421782871672?= X-GMAIL-MSGID: =?utf-8?q?1747377421782871672?= 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 eef98e3f4ae5..1e5822d00043 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3995,7 +3995,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);