fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
Fanotify probably doesn't want to watch autodirs so make it use d_can_lookup()
rather than d_is_dir() when checking a dir watch and give an error on fake
directories.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
index 61fdbb8..9a66ff7 100644
--- a/fs/notify/fanotify/fanotify.c
+++ b/fs/notify/fanotify/fanotify.c
@@ -116,7 +116,7 @@
/* sorry, fanotify only gives a damn about files and dirs */
if (!d_is_reg(path->dentry) &&
- !d_is_dir(path->dentry))
+ !d_can_lookup(path->dentry))
return false;
if (inode_mark && vfsmnt_mark) {