diff options
author | David Howells <dhowells@redhat.com> | 2015-01-29 07:02:36 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-02-22 11:38:42 -0500 |
commit | 54f2a2f42759b11ada761013a12f0e743702219a (patch) | |
tree | 8d1cf4e87856eba3772b466ad4b145218b2f9c79 /fs | |
parent | ce40fa78ef8f0e813392903c96de65b947298d16 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/notify/fanotify/fanotify.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index 61fdbb826324..9a66ff79ff27 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c | |||
@@ -116,7 +116,7 @@ static bool fanotify_should_send_event(struct fsnotify_mark *inode_mark, | |||
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 (!d_is_reg(path->dentry) && | 118 | if (!d_is_reg(path->dentry) && |
119 | !d_is_dir(path->dentry)) | 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) { |