]> git.baikalelectronics.ru Git - kernel.git/commit
fanotify: mix event info and pid into merge key hash
authorAmir Goldstein <amir73il@gmail.com>
Thu, 4 Mar 2021 10:48:24 +0000 (12:48 +0200)
committerJan Kara <jack@suse.cz>
Tue, 16 Mar 2021 15:15:23 +0000 (16:15 +0100)
commit17cb9e0635c899879283571e181e8597cbe1aa1e
treef44e88b4f466c39a6677bdb6a4c372ee1d48d34c
parent52aaaca9f5497ed7ed1b189c9f397eb44e634ee5
fanotify: mix event info and pid into merge key hash

Improve the merge key hash by mixing more values relevant for merge.

For example, all FAN_CREATE name events in the same dir used to have the
same merge key based on the dir inode.  With this change the created
file name is mixed into the merge key.

The object id that was used as merge key is redundant to the event info
so it is no longer mixed into the hash.

Permission events are not hashed, so no need to hash their info.

Link: https://lore.kernel.org/r/20210304104826.3993892-4-amir73il@gmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c
fs/notify/fanotify/fanotify.h