Message ID | 8d9ad5acb9c5c1dd2376a2ff5da6ac3183115389.1688393619.git.nabijaczleweli@nabijaczleweli.xyz |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp583042vqx; Mon, 3 Jul 2023 07:59:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlGCRmEou3lOQrH0/sbE1e8/P62iu2eZpFX9P6MmjsU9mjzn+k/R/+LRcAR1Kv8CAwVIpsAh X-Received: by 2002:a05:6e02:f41:b0:346:1919:7cb1 with SMTP id y1-20020a056e020f4100b0034619197cb1mr967416ilj.2.1688396388786; Mon, 03 Jul 2023 07:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688396388; cv=none; d=google.com; s=arc-20160816; b=mszuNqBLS1cDULuhcXo/vmNGA/xyeNHtgM123kiBNRwg5gSLEXcznWekvj2zj7DrP1 kA/NrCeC2hf7nzohY90TGVAkqhzSGxsYHWGoIGmmRYm7SjjfLD/Cgn7UeIIW4+4aR8UN I3D4mvp4xVd5uJr7SH48xmINBZf2vh0yvU0RASBBayst2zfYaHEq8bdSItk9av25LNdR lRIySq++TU6V4UjURuLWBOOYwMDhxS/XIKFVgnNpqKVXTNE4tZfv6RQ393A6G2DeWzaw ARRkwSLgjdrtHU6223VeM21U/mMcFAVXNqke8dgUWSpeDTGLDIm5gMbnXz7b2R/hOEWf 9Ziw== 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=giTQJ2zpd3lLBmA47HNrew2ito+XTx/TmIVybCLGoeA=; fh=AfCaarrJloRV9X8pgVoQkWOYp+JFhFv1/c5FQOfH+1Q=; b=tRMmHlvbkRqBQCUKZAYO+/2b5T8k8BZ55YgRc4aM6+3qyAzCkPyrBx1WWAyGHvCeoJ ksG9pP9SbIN4zx3Mb6lFk6zhAfd/Uknwwx1a2/JpUBtzEdUDwDs6zJ/iziqDH5DTJ3aB iTpIq2/8xdkXePjUrxGj0KGdLIsHWzM1nJ7Qx6OHs9coQloW6Y7lkoG7h/Jm7FSZoAZW Ka8smYfFADZ7EG4eaYDG6DGOeUzeBlf3A2WQkucDBOiOcR/EOmoSb4zz7ka31neicPgH pbJwUuouMOK159qDwmcN1IXqH5NNF1HOe3+q7+kgFW0Rr6PrgNVYu/iU0YBVxTp7JnEE Co2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=AhrIA4bp; 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 18-20020a630e52000000b0055b553157a9si7933909pgo.827.2023.07.03.07.59.35; Mon, 03 Jul 2023 07:59:48 -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=AhrIA4bp; 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 S231274AbjGCOmW (ORCPT <rfc822;ivan.orlov0322@gmail.com> + 99 others); Mon, 3 Jul 2023 10:42:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229885AbjGCOmU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jul 2023 10:42:20 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 428C3E5C; Mon, 3 Jul 2023 07:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1688395338; bh=bxFjauUq2WL32jHSPjtbjDPG477Jdv0YrEDq/u80aBE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AhrIA4bpNXctnbjB9zL/sj1rGqhNvu6fT18CYncnYQWpQSIoov7xveEfjOSjqjLPy zFtA91S2is2jbaHqb6RgRM3K+YTrqhLPanrW513653hGfBScv8jheHZe9kn0okLZZJ XKA+JI+Yg0gIQrMPbxwRdGJ9k8THmYYI2v3APzNvzS8NqREcJzHyi8SqAHc1REhDAb TdXAgU+ldh/kaK3eaOOH/XDcfCLjqBQvtKHCWbxiQdr3wWsbCEEtQ7uT4FVP57VCL3 kYYXfuN2yUQWehsiZ/iLwv1fgzmh7N4qgxt2MBp0PUydMkBLfKNDQ2tHekvoqg0yO5 EZklTMJRFR6dg== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 8FBCE1B6C; Mon, 3 Jul 2023 16:42:18 +0200 (CEST) Date: Mon, 3 Jul 2023 16:42:17 +0200 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= <nabijaczleweli@nabijaczleweli.xyz> To: Christian Brauner <brauner@kernel.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>, Amir Goldstein <amir73il@gmail.com>, Chung-Chiang Cheng <cccheng@synology.com>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/3] splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice Message-ID: <8d9ad5acb9c5c1dd2376a2ff5da6ac3183115389.1688393619.git.nabijaczleweli@nabijaczleweli.xyz> References: <cover.1688393619.git.nabijaczleweli@nabijaczleweli.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ybsrpykphwaki6lg" Content-Disposition: inline In-Reply-To: <cover.1688393619.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 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?1770411931813647162?= X-GMAIL-MSGID: =?utf-8?q?1770411931813647162?= |
Series |
fanotify accounting for fs/splice.c
|
|
Commit Message
Ahelenia Ziemiańska
July 3, 2023, 2:42 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> Acked-by: Jan Kara <jack@suse.cz> --- fs/splice.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/splice.c b/fs/splice.c index 6ae6da52eba9..5deb12d743b1 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1346,6 +1346,9 @@ static long vmsplice_to_user(struct file *file, struct iov_iter *iter, pipe_unlock(pipe); } + if (ret > 0) + fsnotify_access(file); + return ret; } @@ -1375,8 +1378,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; }