On Mon, Jul 7, 2025 at 7:07 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote: > > 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. Urgh, I mean non-applicable FAN_PRE_ACCESS on readdir referring to this finer tuned d_is_reg() check in patch 2: /* * Pre-content events are only supported on regular files. ... */ if (d_is_reg(dentry) && (p_mask & FSNOTIFY_PRE_CONTENT_EVENTS)) { Thanks, Amir.