fsnotify: optimize the case of no marks of any type
authorAmir Goldstein <amir73il@gmail.com>
Tue, 10 Aug 2021 15:12:20 +0000 (18:12 +0300)
committerJan Kara <jack@suse.cz>
Wed, 11 Aug 2021 11:50:53 +0000 (13:50 +0200)
commite43de7f0862b8598cd1ef440e3b4701cd107ea40
tree837ebcd6be2bf8ed3526a3d4d5c69050d99e01dc
parentec44610fe2b86daef70f3f53f47d2a2542d7094f
fsnotify: optimize the case of no marks of any type

Add a simple check in the inline helpers to avoid calling fsnotify()
and __fsnotify_parent() in case there are no marks of any type
(inode/sb/mount) for an inode's sb, so there can be no objects
of any type interested in the event.

Link: https://lore.kernel.org/r/20210810151220.285179-5-amir73il@gmail.com
Reviewed-by: Matthew Bobrowski <repnop@google.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
include/linux/fsnotify.h