Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp813235rwi; Wed, 19 Oct 2022 03:21:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM48x1ifYe16y1eVMa2CI5zza24QXnWND+BAjYUnJ+rlFD6mQuRrqjuA0wXzjc3cfR6n0hLk X-Received: by 2002:a17:902:748b:b0:181:3fae:9b95 with SMTP id h11-20020a170902748b00b001813fae9b95mr7365962pll.24.1666174870413; Wed, 19 Oct 2022 03:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666174870; cv=none; d=google.com; s=arc-20160816; b=vaQ/IkCOfcfQZlkPP0grkOtcetkZxYrRx+99EQYDN5kCvDCk4d4KHWMm2ytfXfCngD W0+sFZ+Iac95ZVW2NfmPprCnf3ygkgioDx3qi2H79bOmX96xLcRujwPmCb0Mr24016Qj 0JIgZWUSphFkDDU0YFbxro5KbVWO6bNnzNP2/12gJG88SxTSCO1VqsletGCg3QCgjuIB oMAqsbnLiCI0EpCAjaD7ZkATuj8D2uehceWnnWsTVzhdeBwKddvSOt0LLCi2aCyTBVPF EU/W0PSKfC/s7aga5Lrelm3DsaZ9UqyOCsiIYcamSzofX9Bm0S89l8jcamYjS0+eYucX g9Xw== 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=3SqRgJt00H2mfMMvvWdbwlSViR9gidGMtnS4Levsksk=; b=dqn1kUugz6ONqqCCnVbgqSRTaJZef3wg4ivLQC2ACKoKAJNF8cKM5sxTvFnfiO4ZaC UA0E+PqtP84ZLOcUL0Pjv0YNPb6uN8XYQEbJ2reoQCYDYqyGvcMyVQ+PnfOyKXM4Z9+m /vpNPXnOV0pnMuVtkeuRHSoZuq7834WMD4l1aUqblc9Syvr3or2VhoQxSYr4geOGt+/t r6+9et99NKLdDiB/m+yDViAKJFU39oduoCgtObbe+VBKO3jSi4fWfs4ivUVMaSisleqU sIay/sC3jR8rosfJCjJvtqryy4spCkk/ZuvYEXwkn1UQa943M8pgebSWs/WvNHEqrfwP Hrjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vcBksNqI; 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 s3-20020a170902c64300b001865a9586c1si293460pls.59.2022.10.19.03.20.58; Wed, 19 Oct 2022 03:21:10 -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=vcBksNqI; 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 S233404AbiJSJ2M (ORCPT + 99 others); Wed, 19 Oct 2022 05:28:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233335AbiJSJ0q (ORCPT ); Wed, 19 Oct 2022 05:26:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34B21E5EE2; Wed, 19 Oct 2022 02:12:01 -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 018016188A; Wed, 19 Oct 2022 09:09:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16930C433B5; Wed, 19 Oct 2022 09:09:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170582; bh=7xZ7rHr01eEXncxS5mJsDxFL7Ztrh49ewCaAO1obong=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vcBksNqIbne99Km2bgnU4fSqheRaZexoJ2xiqPZt7SnF7629kYPUZgzmr7x3abfT7 Jn8JJUIMq4KedH0T2+2YtvstYs47xikz4Y9NcZPNRN9gSFoHplEbkIYRbfsa63VQD6 eIJAeJqO4IrLo0EZWWin97H2ljoCXO4mqKv4oB9w= 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 6.0 677/862] NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data Date: Wed, 19 Oct 2022 10:32:44 +0200 Message-Id: <20221019083319.883708577@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@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.4 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 ac1b03cf05a5..2960d0a8e8f9 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3988,7 +3988,7 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr, } if (resp->xdr->buf->page_len && splice_ok) { WARN_ON_ONCE(1); - return nfserr_resource; + return nfserr_serverfault; } xdr_commit_encode(xdr); -- 2.35.1