|
@@ -38,7 +38,7 @@ static inline int fsnotify_parent(struct path *path, struct dentry *dentry, __u3
|
|
|
static inline int fsnotify_perm(struct file *file, int mask)
|
|
|
{
|
|
|
struct path *path = &file->f_path;
|
|
|
- struct inode *inode = path->dentry->d_inode;
|
|
|
+ struct inode *inode = file_inode(file);
|
|
|
__u32 fsnotify_mask = 0;
|
|
|
int ret;
|
|
|
|
|
@@ -192,7 +192,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry)
|
|
|
static inline void fsnotify_access(struct file *file)
|
|
|
{
|
|
|
struct path *path = &file->f_path;
|
|
|
- struct inode *inode = path->dentry->d_inode;
|
|
|
+ struct inode *inode = file_inode(file);
|
|
|
__u32 mask = FS_ACCESS;
|
|
|
|
|
|
if (S_ISDIR(inode->i_mode))
|
|
@@ -210,7 +210,7 @@ static inline void fsnotify_access(struct file *file)
|
|
|
static inline void fsnotify_modify(struct file *file)
|
|
|
{
|
|
|
struct path *path = &file->f_path;
|
|
|
- struct inode *inode = path->dentry->d_inode;
|
|
|
+ struct inode *inode = file_inode(file);
|
|
|
__u32 mask = FS_MODIFY;
|
|
|
|
|
|
if (S_ISDIR(inode->i_mode))
|
|
@@ -228,7 +228,7 @@ static inline void fsnotify_modify(struct file *file)
|
|
|
static inline void fsnotify_open(struct file *file)
|
|
|
{
|
|
|
struct path *path = &file->f_path;
|
|
|
- struct inode *inode = path->dentry->d_inode;
|
|
|
+ struct inode *inode = file_inode(file);
|
|
|
__u32 mask = FS_OPEN;
|
|
|
|
|
|
if (S_ISDIR(inode->i_mode))
|