diff options
author | Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> | 2023-07-03 16:42:17 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-07-10 14:36:11 +0200 |
commit | 7f0f1ea069e52d5a16921abd59377a7da6c25149 (patch) | |
tree | 25d3e75466d20598c84ea3748d921cde5b247f57 /fs/splice.c | |
parent | 12ee4b66af34f8e72f3b2fd93a946a955efe7c86 (diff) |
splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice
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: <8d9ad5acb9c5c1dd2376a2ff5da6ac3183115389.1688393619.git.nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/splice.c b/fs/splice.c index 016b0a83df44..2cb89f5f9a8a 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1460,6 +1460,9 @@ static long vmsplice_to_user(struct file *file, struct iov_iter *iter, pipe_unlock(pipe); } + if (ret > 0) + fsnotify_access(file); + return ret; } @@ -1489,8 +1492,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; } |