Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6796569rwi; Mon, 24 Oct 2022 06:17:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5fg++fLN7xzH9Nkrnu22o+txm7v61k4LBhaT3wT54Uh091HCPTi/YsHAPHQjsovtu0tgQj X-Received: by 2002:a05:6402:1391:b0:459:cb69:9a2b with SMTP id b17-20020a056402139100b00459cb699a2bmr30937351edv.201.1666617457536; Mon, 24 Oct 2022 06:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666617457; cv=none; d=google.com; s=arc-20160816; b=pexkM0sK4HBscnwLgbZDBzvVuQ2YH48mTOFRZd9FOg6S7eheLYQCjWijtfnQrta3pn 5ar71IKa/Q7mra7UF86O4/LdstKMiCPSYPP+z2JM+uWCe0683hwLXxkQJlgfi0vLVOFm 9hVINITGTQMuCw7oPPZZE2ifXlUCgfdI620L2QeRrVeDe4uoZmGYdO9lKRioi2bHU5f1 4hDOZujAehP282Rus5jv/mcvZKIOF/ng2CXvV2WxjdneQFLCz3wfSnbps/NNEsqGwpg1 T/7X8fRrQtCBuUx3BQ7CrjSky27LdBpuuo9R0y6EqbUAD8aetGSlLPQJSLYbDjbjQtFd 7nqw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bk2-20020a170906b0c200b0077f2779c178si24624458ejb.254.2022.10.24.06.17.12; Mon, 24 Oct 2022 06:17:37 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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); -- 2.35.1