Jan, Even since we did the FMODE_NONOTIFY optimization, it really bothered me that we do not optimize out FAN_ACCESS_PERM, which I consider to be unused baggage of the legacy API. I finally figured out a way to get rid of this unneeded overhead of all the read APIs. Along the way, also added a trivial optimization for non-applicable FAN_ACCESS_PERM on readdir and prepared the code towards adding pre-dir-content events. This passes the LTP tests, but please take a good look to see if I missed anything. Thanks, Amir. Amir Goldstein (2): fsnotify: merge file_set_fsnotify_mode_from_watchers() with open perm hook fsnotify: optimize FMODE_NONOTIFY_PERM for the common cases fs/file_table.c | 2 +- fs/notify/fsnotify.c | 97 +++++++++++++++++++++----------- fs/open.c | 6 +- include/linux/fs.h | 6 +- include/linux/fsnotify.h | 35 ++---------- include/linux/fsnotify_backend.h | 6 +- 6 files changed, 80 insertions(+), 72 deletions(-) -- 2.43.0