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: 9199 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp458948wru; Mon, 24 Oct 2022 06:38:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5x6sClUa0qt8kFFFcHecoRVleCjHK4l2YEP0rhfaOrn4WJ4Br4uZR4zWm4dBMA7i6OGEOB X-Received: by 2002:aa7:c054:0:b0:453:98c6:f6c4 with SMTP id k20-20020aa7c054000000b0045398c6f6c4mr30604336edo.2.1666618715608; Mon, 24 Oct 2022 06:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666618715; cv=none; d=google.com; s=arc-20160816; b=K3LADUKvEZm2UxsTZQ6bjoONaGmDfODw56fmPy0QtYpKNw7BCNUrOzwmQcA76ZJ/5W 6JZhvQY4OChitC9mleZX2gJLX0ide6j9VAQWGykDqI7lZcPN2nWxnYIi361hbr3lmxNs fzfK4HQ78u42HpXN6tuY4XRMLbSZIS1y+/dp0+GFbS61OuR1In3RGpfik/Sns2eruWW7 ZUecPWXgzEPBlJpRcejDHnz0W6eEouayVoNVHfw3EkuVpMCHNc0IHmMWv/IOiR/lX3wf StFvnyWtkldMnyv0att3SLpicyH7VzWi4Y/nMP7lmbqFph8BrWVmA0v7gzjZJx6FBLAz Pl/A== 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=Zt7YkkVYzkVKi8ct6efit3lKJayIy1l139+x3wliYag=; b=vDa+xoSO9yh61KlTj1xMMKekTrS7eGX309eDP1tjOIBZ1Mt0FMKcbthazs8M2x5RR2 Dbr67L6x0yu/bjFfzBOf+YX06WqvGXXPzArZLxasnd9q24TdCrYAVpIEkv+7q4+2i3KF ujn7gNT0PIkVaQrqf4s0gAIZ7YCQTMKCGi08dUOQDG5Du+Qzm9NBfdZfBhJXF9eHeJKM CRYvylySOrM+0wzq8pDJMyl6yLW9j7BTizI0KvaxZkwtLieKO2Cx1lKzAV6qBQIwOrrb VA2ATdjLZiTCIrrAAS/awvuz4oIJs05W4OvSBmh+iBgmYw2SxZ8InNH9Gax9Ea/kM+4d IwyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uW+RLj3G; 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 hv20-20020a17090760d400b007919388d2d1si20807666ejc.970.2022.10.24.06.37.55; Mon, 24 Oct 2022 06:38:35 -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=uW+RLj3G; 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 S233282AbiJXN0u (ORCPT + 99 others); Mon, 24 Oct 2022 09:26:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236043AbiJXNYJ (ORCPT ); Mon, 24 Oct 2022 09:24:09 -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 83F2D2A711; Mon, 24 Oct 2022 05:30:27 -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 34CCB61325; Mon, 24 Oct 2022 12:29:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47502C433D6; Mon, 24 Oct 2022 12:29:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614549; bh=KwiBHAeC4ATIsxRiekASCeySPN3bCa3arjbO0thAJmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uW+RLj3GcRMlfOekZcuYgvHgUdq2I/nfE9q18H47V9DUaKui5GKzfmiXKpL/zdxme /HMTtfr9LjjCh1Cc4hjocJWIZk51q3bEvQU9YjOERdrSSEE1YbxUmAkjBAsFcIloS7 ZbYcE4z1bmfKPGCW9x6eU4aretz2j9D1nB/HKFZY= 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.10 303/390] NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data Date: Mon, 24 Oct 2022 13:31:40 +0200 Message-Id: <20221024113035.915651681@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@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?1747576386347533953?= X-GMAIL-MSGID: =?utf-8?q?1747576386347533953?= 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 46f825cf53f4..cc605ee0b2fa 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3871,7 +3871,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);