From patchwork Mon Oct 24 11:31:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10177 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp640968wru; Mon, 24 Oct 2022 13:34:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6uSJD8eEAvaRse4nDrlcdMHd/lrboTBjRfT5UWzJLudy6QoefY1kTiK2RG1s5VByZDT3s9 X-Received: by 2002:a17:90b:11d4:b0:212:ee83:481 with SMTP id gv20-20020a17090b11d400b00212ee830481mr13322596pjb.36.1666643643166; Mon, 24 Oct 2022 13:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666643643; cv=none; d=google.com; s=arc-20160816; b=edno8DCA1UpV0J5bcdXpoyBn6yU5mweQbuozDHOA28xDGqAjmNvt/0jxDKr61D3lEY KxwV/NkgLYa3HiqdDiEE3b3dABUYIuFuIcnlUY6AwkMfnl3mUxu/bomYJvZRKdN8dPjc F1a41sESFc2fQWyAsPJr5Wej7kvs2i0Di4dxmzqDza6ch6GIlu/ShyJiOIdlZv+kaLdV hpSt42/6MsURzc/G+FjhiXQQS3aTAeS7sLpFXPp0FXQjmDpoUWEv/im2Dg7wW/LLxzC6 foq6oB8o3YSacfdLMKc6AC+ouDuyBDsmRLYIRVq4ny1kzvpRQZjwtCFQ+gRkERqxBYVY 7TMQ== 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=8c55dpzmAN84GlwUnU4VADz++Rw8GSMxTZI3Cl4Ka4U=; b=h2ObOVhnZhJokLy6GDniw9fd+oEDe1O2ADtAbTcKV5BTW3p9ZQloGQOKVbjMp5syEr zjVH2a3xO4QmyQlC/kYahLIWGdfvs6T5A8TEQualdC1iCYVzdg+qc4evy8eGqP3wTzbr JMTseZNtXmYggprRf+1i4GsJcGQ/w4A4axGBVw3f3i9T6NhnvjaLSI013UMSSNP0a6J9 OWNrAjq0MkWuE2tu/nrKeQkszedLaaEOFTfmltcAa7azlBpesKS2Z4+o2sp7foNndNvX RKjTGrZBb4LDX613hfyNMCNrLzIRsH6NnmGCxMwUHUee3RxI7sj1bAdcnkH1DYZtARD1 jvgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="G1/2DuQ9"; 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 5-20020a631745000000b0045f98453934si420636pgx.872.2022.10.24.13.33.49; Mon, 24 Oct 2022 13:34:03 -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="G1/2DuQ9"; 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 S234071AbiJXUX2 (ORCPT + 99 others); Mon, 24 Oct 2022 16:23:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232593AbiJXUWn (ORCPT ); Mon, 24 Oct 2022 16:22:43 -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 EFB4589900; Mon, 24 Oct 2022 11:38:34 -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 089CAB81618; Mon, 24 Oct 2022 12:14:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65E3AC433B5; Mon, 24 Oct 2022 12:14:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613658; bh=jW4elg5loCepsK7wp7uNpCRmDv18t0TzV6USqvCTJKY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G1/2DuQ9ML9AuXTR5ZpL5FzjvTCK7SPGkojbOPTEQoNNCIYUL/jwsX1PJHDLjShCO 39ca8JZMWSElbirANTLKUB/cruAhH0ILO+TgDv1P0hraDzCTa01d/mR+6TQoMaojWQ jQdWyAq2d5sEsbHwj6TIIaWgcW2rF5ElJpRQk3bI= 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.4 190/255] NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data Date: Mon, 24 Oct 2022 13:31:40 +0200 Message-Id: <20221024113009.287889932@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113002.471093005@linuxfoundation.org> References: <20221024113002.471093005@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=unavailable 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?1747602524821597721?= X-GMAIL-MSGID: =?utf-8?q?1747602524821597721?= 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 e61d9c435957..95bbe9d4018a 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3600,7 +3600,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);