From patchwork Wed Oct 19 08:32:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4867 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp224031wrs; Wed, 19 Oct 2022 02:39:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7HVsj6uZTHJS5xN9PMZzquArqVrS8k7+t04FDTNRjtWPfwZUrYucrsrSaXgGTUONtrgSLC X-Received: by 2002:a05:6402:1555:b0:458:ed89:24e9 with SMTP id p21-20020a056402155500b00458ed8924e9mr6706004edx.55.1666172350142; Wed, 19 Oct 2022 02:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172350; cv=none; d=google.com; s=arc-20160816; b=Ja/QCIfmZptlI2t+ynnnnqsJVT8ZmBs3euqBNqj6WePe0UMVk5z3F8pzHpkNCEY1BG CrvizO0y2QkJJcuDURRgXrP4SROkD8OkndYx416uNnNAokdYEA2KdAIQ4y7tQYp3UbiV 9UJWSaE0N6lM5tv2U2Q2RYysNERrZqgznK0y+16EnTYfbdSsZJbJVDI2+CtOJiCry0J4 QWdLPvGbKjNpWtbVdyixbwDfkpBBhWxEYGu0HGh9sDaHy03ziJnU4If1XZXeG+j0lp52 Tthb7WKtq8CrRdE1J0O0D2TcePKhApbrDndbXHx2yJ9R/EeLO3LcHlBGoC82rvQdWkJs s0jA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt4-20020a170907728400b00791a2a7e578si2736698ejc.641.2022.10.19.02.38.45; Wed, 19 Oct 2022 02:39: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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747108338316278053?= X-GMAIL-MSGID: =?utf-8?q?1747108338316278053?= 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);