Re: [PATCH 01/22] fsnotify: Remove unnecessary tests when showing fdinfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 22, 2016 at 5:16 PM, Jan Kara <jack@xxxxxxx> wrote:
> On Thu 22-12-16 14:59:35, Amir Goldstein wrote:
>> On Thu, Dec 22, 2016 at 11:15 AM, Jan Kara <jack@xxxxxxx> wrote:
>> > show_fdinfo() iterates group's list of marks. All marks found there are
>> > guaranteed to be alive and they stay so until we release
>> > group->mark_mutex. So remove uncecessary tests whether mark is alive.
>> >
>>
>> The statement above is true for fanotify. I don't think it holds for inotify.
>>
>> SYS_inotify_rm_watch()
>>   fsnotify_destroy_mark()
>>     fsnotify_destroy_mark(mark, group)
>>         mutex_lock_nested(&group->mark_mutex) /* not really nested for
>> inotify */
>>         fsnotify_detach_mark(mark)
>>         mutex_unlock(&group->mark_mutex);
>>         fsnotify_free_mark(mark)
>>            mark->flags &= ~FSNOTIFY_MARK_FLAG_ALIVE;
>> /* !!! mark is not alive and on the group's list. group->mark_mutex is
>> not held !!! */
>
> How come it is on the group's list? fsnotify_detach_mark() will remove it
> from that list... The destroy_list is just a private list used for mark
> destruction, not a list of any group.
>

I stand corrected. This is bound to happen a few more times ;-)

Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux