On Thu 16-07-20 11:42:20, Amir Goldstein wrote: > fsnotify usually calls inotify_handle_event() once for watching parent > to report event with child's name and once for watching child to report > event without child's name. > > Do the same thing with a single callback instead of two callbacks when > marks iterator contains both inode and child entries. > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> Another idea for possible future cleanup here: Everybody except for fanotify cares only about inode marks and reporting both parent and child only complicates things for them (and I can imagine bugs being created by in-kernel fsnotify users because they misunderstand inode-vs-child mark types etc.). So maybe we can create another fsnotify_group operation similar to ->handle_event but with simpler signature for these simple notification handlers and send_to_group() will take care of translating the complex fsnotify() call into a sequence of these simple callbacks. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR