From patchwork Mon Jul 3 14:42:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?0L3QsNCx?= X-Patchwork-Id: 13300202 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A800EB64DC for ; Mon, 3 Jul 2023 14:42:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231296AbjGCOm3 (ORCPT ); Mon, 3 Jul 2023 10:42:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231290AbjGCOm1 (ORCPT ); Mon, 3 Jul 2023 10:42:27 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 806B2E74; Mon, 3 Jul 2023 07:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1688395342; bh=SowbDY6YnsriPuN0djgR0SpF4itfDBztRXtp8moML7o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EsXuPnSi0xOmIDA9aB+N2jhQz9p0AOzj61HDIQTIJdzsnRWnGbDF/huwP1B2Kx+s4 GKbOd+IEDrPuqA8IYlgDBOn6HOsDRcDqUnEcUykq7eexZHfYx4Z3D/N8VYaI//nkFq WJkt4AYUkUzX5FoP6FZzjhpdok8hVpqoRCs4WGx2pbfxIKqawO2xUiBirSXWlAmDpE P8FV50NHcwz5rhWzafQCFhpJ2R+IRTIKCBssG8XeIt/RX5FLzqNjXl7fEXeVDbeqZB +llvKsXyqOJZ9yQPPq7UR0PsOfrof+FV3TOpe1D5CNEgiM3y7YUE3X9IMLGbTYa4l6 iS2kXT2bbIGnA== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 9D49F1DC4; Mon, 3 Jul 2023 16:42:22 +0200 (CEST) Date: Mon, 3 Jul 2023 16:42:21 +0200 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= To: Christian Brauner Cc: Alexander Viro , Jan Kara , Amir Goldstein , Chung-Chiang Cheng , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 3/3] splice: fsnotify_access(in), fsnotify_modify(out) on success in tee Message-ID: <10d76dd8c85017ae3cd047c9b9a32e26daefdaa2.1688393619.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20230517 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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 Reviewed-by: Amir Goldstein Acked-by: Jan Kara --- fs/splice.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/splice.c b/fs/splice.c index 5deb12d743b1..c49909dbf3c5 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1815,6 +1815,11 @@ long do_tee(struct file *in, struct file *out, size_t len, unsigned int flags) } } + if (ret > 0) { + fsnotify_access(in); + fsnotify_modify(out); + } + return ret; }