On 12.09.2016 10:32, Jan Kara wrote: > >> Why dont we set the shutdown flag directly in release() as soon as we >> grep the notification mutex. I dont see any reason to do this seperated >> from the removal of events from the notification list (or do I miss >> something?). Similar situation in destroy_group(): We can set the flag >> in flush_notify instead of destroy_group (we then do not even need the >> dedicated function stop_queueing() then). > > We could do it like that but I didn't want fanotify to hook into generic > fsnotify internals and rather wanted to encapsulate the functionality in > a function. Since this is not really performance critical, extra round trip > on notification_mutex should be fine. I understood that flag as an extension for generic fsnotify groups, not only for fanotify. Sure, there is nothing else that uses it right now, but "being destroyed" is a state that is valid for all types of fsnotify groups, and it could be useful in future to know when a group is in this state. But maybe it depends on the point of view if this should be treated as a fanotify or fsnotify extension. And its up to you, of course. Regards, Lino -- 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