From fa9b379188a08b035734da082ef41cbcbf6f8f0b Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Thu, 13 Aug 2009 18:21:10 -0400 Subject: 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 --- fs/compat.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fs/compat.c') diff --git a/fs/compat.c b/fs/compat.c index 6c19040ffeef..9ebfea0033ec 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -1170,11 +1170,10 @@ out: if (iov != iovstack) kfree(iov); if ((ret + (type == READ)) > 0) { - struct dentry *dentry = file->f_path.dentry; if (type == READ) - fsnotify_access(dentry); + fsnotify_access(file); else - fsnotify_modify(dentry); + fsnotify_modify(file); } return ret; } -- cgit v1.2.3