From patchwork Mon Oct 16 20:35:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ahelenia_Ziemia=C5=84ska?= X-Patchwork-Id: 153748 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3711668vqb; Mon, 16 Oct 2023 13:36:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+2gMNAhhW1o7oLsXDX+TBC28K8YtGZ2IJoogJBz3Pr4+O8IABhVmyIyJb1W3/ERwh/57m X-Received: by 2002:a05:6a20:c182:b0:13d:fff1:c672 with SMTP id bg2-20020a056a20c18200b0013dfff1c672mr140467pzb.4.1697488585956; Mon, 16 Oct 2023 13:36:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697488585; cv=none; d=google.com; s=arc-20160816; b=JscpXxbZRTJxRZE9pwb5nKXAW6DW6hOhNLTDi0tYDCLEEvqpii3ZZ+99N8KxzYb+UQ zWKww9Xsg1pYefmaRumsYfj5dDIN4l2hzVP3QQxpul/KfTNQFRcVHuqZAol/5vF4ZRas q9PzgA/u5p4VwnX6u16OcZLbkC2zD0AGFRmoTKXgtAk07l4kM4tUBgynFgerKXza1mIU GBUmyYcEgF6buCMLJjQfLU04HSCvieEPoTHfAtBKl2hBxu9B/ZmvTAoV4f53ndEdocJ8 lc0waAU/krEw9efVwx3Bp2LGHu3/H6FG0Mc4aaW+4AXxQ+17VOHZmaiS8VA3rs1S+nnk Tp9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:from:date :dkim-signature; bh=OVgZ8qSxw7ctC1lItSIRvXZLIeEVkvf+UczY6Pev1qw=; fh=TWGmj1uUuQ2Z68kTkEF/Iq99wAblF/0MS/Hplf/0o1c=; b=JBmQx8NJXTc1puI2sLgwn1buUSHA/RA8NxqUKaGOLC71ccQdPG1XG/ANGseGL5Avbc L2aDld8RdBJuIv9YcRF5NMm9/c2i8DQbiOPr/tbWfHaUdc5Ia6eW0BTMI3mDwqL2UVBn yVxnWPGM2OO/5jn1luZnnw0lW+RvXD9MhdaUD7nBBbfbort+GawuXpvDs+iLjk65t284 HkodoBi0tgkAGn8r7WMwnpTkemSWXaVQuw6IpT86BzFl0csNvuBk8/1TBVxwcAC6fHtI Rug+VNk6HOdiWH7YPXqhIQPhy5SYjHkS0wVZJhEoR0FPEPSYQtl5NmlkoZn/VuJuPDxu B2ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b="IPYJ/UOZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id p2-20020a170902eac200b001ca85dc8815si111204pld.97.2023.10.16.13.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 13:36:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b="IPYJ/UOZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A5089805A582; Mon, 16 Oct 2023 13:36:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234234AbjJPUgJ (ORCPT + 18 others); Mon, 16 Oct 2023 16:36:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234158AbjJPUf7 (ORCPT ); Mon, 16 Oct 2023 16:35:59 -0400 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92D2EFB for ; Mon, 16 Oct 2023 13:35:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1697488547; bh=BL2nvvqmXUiLD1k/WJxDJuoKF37Dds8amZSyjDvQggY=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=IPYJ/UOZHMjmTbBk0B4ucR9ykxebZ6gj9hCrlA67sv//yW+ch5OYd8tuQ5AEyygEo 8ccEpfpkL6BvcJrN8JKDbIlKu7kf7nQG0QPh38XhGQOYvMCgQmYyd+bh7O17U+alGT 2q53FEEmpgaqR2tOMi8sjPYvQP+UlY+zDvbCd2AYMiylE9pMej5ynHLGFfFcjp5sxH lKGc0BIOJDCHDgtOgGuhDrPMp/pLuNGE6yN3D3ktY2lmnQVvov4Zi+MQ202wvSjIs2 H1d8bgllteTwDIxS7vaGLAUjPabkkz2HqQ40DRTPrdI9HsNE2Zqcdo1UIKoJ9MZXAX aR3O0jsM3QQCQ== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id CAC2310412; Mon, 16 Oct 2023 22:35:47 +0200 (CEST) Date: Mon, 16 Oct 2023 22:35:47 +0200 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= Cc: Andrew Morton , Hyeonggon Yoo <42.hyeyoo@gmail.com>, "Liam R. Howlett" , Pengcheng Yang , Zhang Zhengming , Xu Panda , Li kunyu , Gavrilov Ilia , Suren Baghdasaryan , linux-kernel@vger.kernel.org Subject: [PATCH 05/11] relayfs: relay_file_splice_read: always return -EAGAIN for no data Message-ID: <329ea2aecb56e982f16aea7c637fd0e8a7985506.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20231006 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 16 Oct 2023 13:36:19 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779945791515754256 X-GMAIL-MSGID: 1779945791515754256 For consistency with the new "file->pipe reads non-blockingly" semantic. Signed-off-by: Ahelenia ZiemiaƄska --- kernel/relay.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/relay.c b/kernel/relay.c index 83fe0325cde1..3d381e94a204 100644 --- a/kernel/relay.c +++ b/kernel/relay.c @@ -1215,8 +1215,7 @@ static ssize_t relay_file_splice_read(struct file *in, if (ret < 0) break; else if (!ret) { - if (flags & SPLICE_F_NONBLOCK) - ret = -EAGAIN; + ret = -EAGAIN; break; }