diff options
author | Scott Wolchok <[email protected]> | 2012-12-20 15:05:52 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2012-12-20 17:40:21 -0800 |
commit | a68c2f12b4b28994aaf622bbe5724b7258cc2fcf (patch) | |
tree | c78116c77b068c3b57aa3bdddd40c2ecdd0d5a9f | |
parent | 891348ca0f66206f1dc0e30d63757e3df1ae2d15 (diff) |
sendfile: allows bypassing of notifier events
do_sendfile() in fs/read_write.c does not call the fsnotify functions,
unlike its neighbors. This manifests as a lack of inotify ACCESS events
when a file is sent using sendfile(2).
Addresses
https://bugzilla.kernel.org/show_bug.cgi?id=12812
[[email protected]: use fsnotify_modify(out.file), not fsnotify_access(), per Dave]
Signed-off-by: Alan Cox <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Scott Wolchok <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | fs/read_write.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index 1edaf099ddd7..bb34af315280 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -935,6 +935,8 @@ ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos, size_t count, if (retval > 0) { add_rchar(current, retval); add_wchar(current, retval); + fsnotify_access(in.file); + fsnotify_modify(out.file); } inc_syscr(current); |