aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify/fanotify/fanotify.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/notify/fanotify/fanotify.c')
-rw-r--r--fs/notify/fanotify/fanotify.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
index 51ceb8107284..9a66ff79ff27 100644
--- a/fs/notify/fanotify/fanotify.c
+++ b/fs/notify/fanotify/fanotify.c
@@ -115,8 +115,8 @@ static bool fanotify_should_send_event(struct fsnotify_mark *inode_mark,
115 return false; 115 return false;
116 116
117 /* sorry, fanotify only gives a damn about files and dirs */ 117 /* sorry, fanotify only gives a damn about files and dirs */
118 if (!S_ISREG(path->dentry->d_inode->i_mode) && 118 if (!d_is_reg(path->dentry) &&
119 !S_ISDIR(path->dentry->d_inode->i_mode)) 119 !d_can_lookup(path->dentry))
120 return false; 120 return false;
121 121
122 if (inode_mark && vfsmnt_mark) { 122 if (inode_mark && vfsmnt_mark) {
@@ -139,7 +139,7 @@ static bool fanotify_should_send_event(struct fsnotify_mark *inode_mark,
139 BUG(); 139 BUG();
140 } 140 }
141 141
142 if (S_ISDIR(path->dentry->d_inode->i_mode) && 142 if (d_is_dir(path->dentry) &&
143 !(marks_mask & FS_ISDIR & ~marks_ignored_mask)) 143 !(marks_mask & FS_ISDIR & ~marks_ignored_mask))
144 return false; 144 return false;
145 145