fsnotify: fix unlink performance regression
authorAmir Goldstein <amir73il@gmail.com>
Sun, 5 May 2019 09:15:49 +0000 (12:15 +0300)
committerJan Kara <jack@suse.cz>
Thu, 9 May 2019 10:44:00 +0000 (12:44 +0200)
commit4d8e7055a4058ee191296699803c5090e14f0dff
treea7e72b2ea6aea71fc5f82dbe6a52a224d4f23dc2
parent11a6f8e2db26519b6468686411deafab81c14741
fsnotify: fix unlink performance regression

__fsnotify_parent() has an optimization in place to avoid unneeded
take_dentry_name_snapshot().  When fsnotify_nameremove() was changed
not to call __fsnotify_parent(), we left out the optimization.
Kernel test robot reported a 5% performance regression in concurrent
unlink() workload.

Reported-by: kernel test robot <rong.a.chen@intel.com>
Link: https://lore.kernel.org/lkml/20190505062153.GG29809@shao2-debian/
Link: https://lore.kernel.org/linux-fsdevel/20190104090357.GD22409@quack2.suse.cz/
Fixes: 5f02a8776384 ("fsnotify: annotate directory entry modification events")
CC: stable@vger.kernel.org
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fsnotify.c
include/linux/fsnotify.h
include/linux/fsnotify_backend.h