From patchwork Mon Oct 24 11:31:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8871 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp433201wru; Mon, 24 Oct 2022 05:48:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5mgJVhNCVWAC283FWqWbkLx8LLOxaKPbZ16l7srlP2fUFu4RMOm2Ms2LqhIU54BhSNJGCW X-Received: by 2002:a17:902:ce82:b0:185:47af:a0e8 with SMTP id f2-20020a170902ce8200b0018547afa0e8mr33295567plg.7.1666615729262; Mon, 24 Oct 2022 05:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615729; cv=none; d=google.com; s=arc-20160816; b=t63PePgRuV81kXhILTegQv80mbezgzH7Qyp7FGBmK8JfKHzYguusfT/HdIcECh+MhD RWGyyromEhtQoB4sa0f3BHW07rcDu8Wqj7wDZjV6KqUUL2TUdGOKLMPQe0vvweKU1bqF 6/cxPqQ/O0J4XUoTwS/WBwOq2LHUuxnUaqnKueDFL104nX6GFwozpUFn0iCQRpgXhVg5 zmpK1c6szvelUqSmuY0525hRPqNN2uqlXh6Re/SYhzorfNNDOH9aUlldVghBpdzBirG5 HauookOiuKMr/ROhjPbm41z4X4MDBhFOWUkxYL8xgpcemJlSO6G0AvLGrdtjR6jhvOdt 1Jkw== 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=Z5nqwFD+CaOOTSbOfYzj88Kbq/GKGD8OjLtExiCG038=; b=EmJrUy1Jz7bwfdZNGFj4CbZLAWUa0BghfaUN4M6TMfmGacFtPjF+iL4UIwcoLVo7td 8VTCStFgJyFNYoyzQcphE7J00b8+HmvKmrgEgSsGkuL2uneQJJM7tsXYdyVVl+3m5N7j 3h9Aa1jyC4XCSOGwf8yyoQFnVj01zfqc1idZPK4U1DZHsqEFYhAS1XoYkICf4ivRM/2y F40yBSfFhygPKNJBy8AfPBYBhqXTW9/26ON5d4jv2KzvWO90sWTKRytB/Bltzpt9w+Xo N9F3t3hkRB/aqR4pfhoZTKNAJU9MBrRry+rmyQbqx+yxtcxoAgn9yzMSVDcv7QzzcH7s WIdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eQ8ecTBo; 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 mz21-20020a17090b379500b00200ab48e149si7906230pjb.72.2022.10.24.05.48.35; Mon, 24 Oct 2022 05:48:49 -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=eQ8ecTBo; 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 S229914AbiJXMht (ORCPT + 99 others); Mon, 24 Oct 2022 08:37:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233901AbiJXMbj (ORCPT ); Mon, 24 Oct 2022 08:31:39 -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 C708820F55; Mon, 24 Oct 2022 05:04:44 -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 C7CCFB81134; Mon, 24 Oct 2022 12:02:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C479C433C1; Mon, 24 Oct 2022 12:02:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612935; bh=b5hxz7ELFsuA/ayGSxoTJzXWNM2liJklMoKmYT0WhN8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eQ8ecTBoX/FDJnQxjRuDb3yz6pLicC2MoeS6S9xrP0z7UJuezXA0JsQHoAPEeIleP EXP++56Z5AqSIWZK450F47Mxv3kFEx7ldTUOe3ggQKNt7LhK+rhcKy1Z4D4GJPRtu8 SJBk4d2hfFCRRsxD58jTd8AwSfVxOppjzGbtl16Y= 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.19 175/229] NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data Date: Mon, 24 Oct 2022 13:31:34 +0200 Message-Id: <20221024113004.748316952@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@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?1747573255027740069?= X-GMAIL-MSGID: =?utf-8?q?1747573255027740069?= 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 f67c5de1aeb8..96b79bd90631 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3594,7 +3594,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);