Message ID | c4e47008a1f8a8177223b15d6e3fe5f62c36798e.1687898895.git.nabijaczleweli@nabijaczleweli.xyz |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8469483vqr; Tue, 27 Jun 2023 14:04:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4/X3ckam/ZQSrHh3JvUliIn4x9qaoX6/9WujEuQJTMiU7Ma0ZWhz7ktYrLCoatItBVYDpC X-Received: by 2002:a05:6a00:2341:b0:680:98c:c58d with SMTP id j1-20020a056a00234100b00680098cc58dmr1213995pfj.2.1687899873578; Tue, 27 Jun 2023 14:04:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687899873; cv=none; d=google.com; s=arc-20160816; b=0Qe5NH2GZJAn4o1khpJ0p3sBgWiNUCpbU0+tR1cB4IXvc2Q/Ay6kZEokO6xikgaz1D TkiWi3H+ziOr6mZVyNpXSOKRDLk6puAriHYuRZDZlVQk7+gi5dWNqi9pkMxlaIeMpsfz H33oTNpbE+tVGexDYUEVk1K0OrfUu5lZscOcZ8kX4t2xCdf3fStzjV3xVru4KMXIsvvb dDYYZbQP7PURjwbdaXg/Iyvku2GRcASnx7SUsvqH4n7SkeI9Vo/aLS9dAPjE+TRLs7ei 5KVsa2Tx2aRrH98SrPCl0kn4/YfpGT84nEcqMgWNGRwx2NOHkxRTMuNBPZ5VMCA+jU2P Bv1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=5c3jqWusw7yTHpo/mTlxqP1X9xA1G+7Wx7TyuyE9aoA=; fh=EwHFucLs4bwDakTQKl/ndDudi5N9htFCanErUntz+qw=; b=TuSE5OZSDboeuy7IGthsxDZtrAk8mFqOuaxJPMuvUInJgtWxSFcOZY13l+/4mQeiaq Om4MQufgTGzMvSlKCDXZJ1NoxgI3BLG1iEKEs4ippd6xpgmEDHPtJNRYRMDrlUbXv248 CfUgXqAXDwYWiJI2EYywvw9Shes6h4oC9SmQ+0hTrsUEf2/s1kcS4aY3Y3hpb+QU8Bcv McMlXhbwLalsuBh0PZ/1S/drZHmkBMwB4eaZ7MUv7Xi4bzCOSMuZjdx2WD/1B00/zqf+ pGS/43iTGqF2E5xhCjet63s/jQqBDLubhTVof45p2ujXMcG/rF9FyJa/EJSKCZSYvaMn wYUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=Idml7t5m; 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=nabijaczleweli.xyz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r25-20020a6560d9000000b0053f0bfcd4fasi8070949pgv.173.2023.06.27.14.03.56; Tue, 27 Jun 2023 14:04:33 -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=@nabijaczleweli.xyz header.s=202305 header.b=Idml7t5m; 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=nabijaczleweli.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231598AbjF0UvM (ORCPT <rfc822;nicolai.engesland@gmail.com> + 99 others); Tue, 27 Jun 2023 16:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231584AbjF0UvI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 27 Jun 2023 16:51:08 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A77A0294A; Tue, 27 Jun 2023 13:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1687899060; bh=6Wh1Cs4Lx6l34QcFbXvDoNqOObzq40OnIaHRz3J6+lA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Idml7t5m1KSjmntTg/8gAFAJ/EDz4Lr2BddO4Ua2npmHdP7LXjuQpA20sYyfh4I1i 3wFcnoO1EgqqLnLHQaLGlWiguVFmRIWfmP4QKt3LLt5xAK0P7JR8VT3yknBzAvTl0S fBoilZA9WGbENUtWy7UUhCqj8x46POnvEbjtSkIiKh43PP7312mlfq6SgumuRrcAOq dCMIUgpjwcReQknykV0svSul/aHybkpA0oeQ9YzonP2IY48CAuI7MC012GXzEZ5IOe cX0lMSEdsGKWvePax1AoLM01P1PX5Q6TzrZ/iGQBXxCp4tA1LjkYdp99nabv94ef+E swhyhQknB5SJA== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id C7B351A24; Tue, 27 Jun 2023 22:51:00 +0200 (CEST) Date: Tue, 27 Jun 2023 22:50:59 +0200 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= <nabijaczleweli@nabijaczleweli.xyz> To: Amir Goldstein <amir73il@gmail.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara <jack@suse.cz>, Chung-Chiang Cheng <cccheng@synology.com>, ltp@lists.linux.it Subject: [PATCH v4 2/3] splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice Message-ID: <c4e47008a1f8a8177223b15d6e3fe5f62c36798e.1687898895.git.nabijaczleweli@nabijaczleweli.xyz> References: <t5az5bvpfqd3rrwla43437r5vplmkujdytixcxgm7sc4hojspg@jcc63stk66hz> <cover.1687898895.git.nabijaczleweli@nabijaczleweli.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nslsgyputznadjqs" Content-Disposition: inline In-Reply-To: <cover.1687898895.git.nabijaczleweli@nabijaczleweli.xyz> User-Agent: NeoMutt/20230517 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,PDS_RDNS_DYNAMIC_FP, RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769891297762185931?= X-GMAIL-MSGID: =?utf-8?q?1769891297762185931?= |
Series |
[v4,1/3] splice: always fsnotify_access(in), fsnotify_modify(out) on success
|
|
Commit Message
Ahelenia Ziemiańska
June 27, 2023, 8:50 p.m. UTC
Same logic applies here: this can fill up the pipe and pollers that rely on getting IN_MODIFY notifications never wake up. Fixes: 983652c69199 ("splice: report related fsnotify events") Link: https://lore.kernel.org/linux-fsdevel/jbyihkyk5dtaohdwjyivambb2gffyjs3dodpofafnkkunxq7bu@jngkdxx65pux/t/#u Link: https://bugs.debian.org/1039488 Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: Amir Goldstein <amir73il@gmail.com> --- fs/splice.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/splice.c b/fs/splice.c index b5c7a5ae0e94..d3a7f4d5c078 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1341,6 +1341,9 @@ static long vmsplice_to_user(struct file *file, struct iov_iter *iter, pipe_unlock(pipe); } + if (ret > 0) + fsnotify_access(file); + return ret; } @@ -1370,8 +1373,10 @@ static long vmsplice_to_pipe(struct file *file, struct iov_iter *iter, if (!ret) ret = iter_to_pipe(iter, pipe, buf_flag); pipe_unlock(pipe); - if (ret > 0) + if (ret > 0) { wakeup_pipe_readers(pipe); + fsnotify_modify(file); + } return ret; }