diff options
author | Amir Goldstein <amir73il@gmail.com> | 2019-01-10 19:04:29 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2019-02-06 15:18:06 +0100 |
commit | e220140ff6241e180d0c2fc294e61ee6bbc6a18e (patch) | |
tree | b630e72b298be61e3c99ab932dc914268ceae431 /fs/notify/fsnotify.c | |
parent | 5f02a877638472e83cb5e335f9eec27052b1c7c2 (diff) | |
download | linux-e220140ff6241e180d0c2fc294e61ee6bbc6a18e.tar.bz2 |
fsnotify: remove dirent events from FS_EVENTS_POSS_ON_CHILD mask
"dirent" events are referring to events that modify directory entries,
such as create,delete,rename. Those events are always be reported
on a watched directory, regardless if FS_EVENT_ON_CHILD is set
on the watch mask.
ALL_FSNOTIFY_DIRENT_EVENTS defines all the dirent event types and
those event types are removed from FS_EVENTS_POSS_ON_CHILD.
That means for a directory with an inotify watch and only dirent
events in the mask (i.e. create,delete,move), all children dentries
will no longer have the DCACHE_FSNOTIFY_PARENT_WATCHED flag set.
This will allow all events that happen on children to be optimized
away in __fsnotify_parent() without the need to dereference
child->d_parent->d_inode->i_fsnotify_mask.
Since the dirent events are never repoted via __fsnotify_parent(),
this results in no change of logic, but only an optimization.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/notify/fsnotify.c')
0 files changed, 0 insertions, 0 deletions