VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
[linux-2.6-block.git] / fs / notify / fanotify / fanotify.c
index 51ceb81072847441135303dd752f57e6a97e2646..61fdbb826324e2a20e5ad5877dea9b0772b0e995 100644 (file)
@@ -115,8 +115,8 @@ static bool fanotify_should_send_event(struct fsnotify_mark *inode_mark,
                return false;
 
        /* sorry, fanotify only gives a damn about files and dirs */
-       if (!S_ISREG(path->dentry->d_inode->i_mode) &&
-           !S_ISDIR(path->dentry->d_inode->i_mode))
+       if (!d_is_reg(path->dentry) &&
+           !d_is_dir(path->dentry))
                return false;
 
        if (inode_mark && vfsmnt_mark) {
@@ -139,7 +139,7 @@ static bool fanotify_should_send_event(struct fsnotify_mark *inode_mark,
                BUG();
        }
 
-       if (S_ISDIR(path->dentry->d_inode->i_mode) &&
+       if (d_is_dir(path->dentry) &&
            !(marks_mask & FS_ISDIR & ~marks_ignored_mask))
                return false;