Re: [PATCH 1/1 linux-next] fanotify: fix a lock in fanotify_should_send_event()
From: Lino Sanfilippo
Date: Fri Mar 20 2015 - 21:01:17 EST
On 20.03.2015 22:09, Andrew Morton wrote:
> On Fri, 20 Mar 2015 21:56:08 +0100 Fabian Frederick <fabf@xxxxxxxxx> wrote:
>
>> ltp/fanotify02 was locked since commit 66ba93c0d7fe
>> ("fanotify: don't set FAN_ONDIR implicitly on a marks ignored mask")
>
> What does "ltp/fanotify02 was locked" mean? That this particular test
> failed to exit, or...?
>
>> --- a/fs/notify/fanotify/fanotify.c
>> +++ b/fs/notify/fanotify/fanotify.c
>> @@ -140,8 +140,8 @@ static bool fanotify_should_send_event(struct fsnotify_mark *inode_mark,
>> }
>>
>> if (d_is_dir(path->dentry) &&
>> - !(marks_mask & FS_ISDIR & ~marks_ignored_mask))
>> - return false;
>> + (marks_mask & FS_ISDIR & ~marks_ignored_mask))
>> + return true;
>
> 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.
Regards,
Lino
--
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/