Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54f2a2f4 authored by David Howells's avatar David Howells Committed by Al Viro
Browse files

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: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ce40fa78
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ static bool fanotify_should_send_event(struct fsnotify_mark *inode_mark,

	/* 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) {