diff options
author | Eric Paris <eparis@redhat.com> | 2009-08-13 18:21:10 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2009-11-06 13:18:58 -0500 |
commit | fa9b379188a08b035734da082ef41cbcbf6f8f0b (patch) | |
tree | 68c2248cb050b363d0ef3edc2a1fbd3f914a88a8 /fs/read_write.c | |
parent | f0934f20b9bd43ba5503f793f88f8a61958177b3 (diff) |
fsnotify: pass a file instead of an inode to open, read, and write
fanotify, the upcoming notification system actually needs a struct path so it can
do opens in the context of listeners, and it needs a file so it can get f_flags
from the original process. Close was the only operation that already was passing
a struct file to the notification hook. This patch passes a file for access,
modify, and open as well as they are easily available to these hooks.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/read_write.c')
-rw-r--r-- | fs/read_write.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index 3ac28987f22a..0ddf1626e202 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -293,7 +293,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) else ret = do_sync_read(file, buf, count, pos); if (ret > 0) { - fsnotify_access(file->f_path.dentry); + fsnotify_access(file); add_rchar(current, ret); } inc_syscr(current); @@ -348,7 +348,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_ else ret = do_sync_write(file, buf, count, pos); if (ret > 0) { - fsnotify_modify(file->f_path.dentry); + fsnotify_modify(file); add_wchar(current, ret); } inc_syscw(current); @@ -656,9 +656,9 @@ out: kfree(iov); if ((ret + (type == READ)) > 0) { if (type == READ) - fsnotify_access(file->f_path.dentry); + fsnotify_access(file); else - fsnotify_modify(file->f_path.dentry); + fsnotify_modify(file); } return ret; } |