summaryrefslogtreecommitdiff
path: root/include/linux/fsnotify.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fsnotify.h')
-rw-r--r--include/linux/fsnotify.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
index f958e93feb97..845e57abfb86 100644
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@ -153,8 +153,9 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry)
/*
* fsnotify_access - file was read
*/
-static inline void fsnotify_access(struct dentry *dentry)
+static inline void fsnotify_access(struct file *file)
{
+ struct dentry *dentry = file->f_path.dentry;
struct inode *inode = dentry->d_inode;
__u32 mask = FS_ACCESS;
@@ -162,14 +163,15 @@ static inline void fsnotify_access(struct dentry *dentry)
mask |= FS_IN_ISDIR;
fsnotify_parent(dentry, mask);
- fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
+ fsnotify(inode, mask, file, FSNOTIFY_EVENT_FILE, NULL, 0);
}
/*
* fsnotify_modify - file was modified
*/
-static inline void fsnotify_modify(struct dentry *dentry)
+static inline void fsnotify_modify(struct file *file)
{
+ struct dentry *dentry = file->f_path.dentry;
struct inode *inode = dentry->d_inode;
__u32 mask = FS_MODIFY;
@@ -177,14 +179,15 @@ static inline void fsnotify_modify(struct dentry *dentry)
mask |= FS_IN_ISDIR;
fsnotify_parent(dentry, mask);
- fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
+ fsnotify(inode, mask, file, FSNOTIFY_EVENT_FILE, NULL, 0);
}
/*
* fsnotify_open - file was opened
*/
-static inline void fsnotify_open(struct dentry *dentry)
+static inline void fsnotify_open(struct file *file)
{
+ struct dentry *dentry = file->f_path.dentry;
struct inode *inode = dentry->d_inode;
__u32 mask = FS_OPEN;
@@ -192,7 +195,7 @@ static inline void fsnotify_open(struct dentry *dentry)
mask |= FS_IN_ISDIR;
fsnotify_parent(dentry, mask);
- fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
+ fsnotify(inode, mask, file, FSNOTIFY_EVENT_FILE, NULL, 0);
}
/*