summaryrefslogtreecommitdiffstats
path: root/fs/splice.c
diff options
context:
space:
mode:
authorAhelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>2023-07-03 16:42:21 +0200
committerChristian Brauner <brauner@kernel.org>2023-07-10 14:36:11 +0200
commit576d498e0ac5caff2d9f6312573ab54d98f12d32 (patch)
treeea5035075c9b3538023e35c9d09ac3d5cf7900ff /fs/splice.c
parentsplice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice (diff)
downloadlinux-576d498e0ac5caff2d9f6312573ab54d98f12d32.tar.xz
linux-576d498e0ac5caff2d9f6312573ab54d98f12d32.zip
splice: fsnotify_access(in), fsnotify_modify(out) on success in tee
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> Acked-by: Jan Kara <jack@suse.cz> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Message-Id: <10d76dd8c85017ae3cd047c9b9a32e26daefdaa2.1688393619.git.nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to '')
-rw-r--r--fs/splice.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 2cb89f5f9a8a..378fedb392ae 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1929,6 +1929,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;
}