Re: [PATCH 1/1 linux-next] fanotify: fix a lock in fanotify_should_send_event()

From: Lino Sanfilippo
Date: Fri Mar 20 2015 - 21:15:33 EST


On 21.03.2015 02:01, Lino Sanfilippo wrote:

>> Should that be (marks_mask & FS_ISDIR & marks_ignored_mask)?
>>
>
> No, the current logic should be correct, since we want events for
> directories if we have FS_ISDIR set in the marks mask but not in its
> ignored_mask.
>

Actually this should be: "... since we ONLY want events for directories
if we have FS_ISDIR set in the marks mask but not in its ignored_mask".

With Fabians Code we could even get events for dirs although FAN_ONDIR
has not been set - which is not what we want.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/