kernel_samsung_a53x/include
Amir Goldstein 13ae1a2557 fsnotify: clear PARENT_WATCHED flags lazily
[ Upstream commit 172e422ffea20a89bfdc672741c1aad6fbb5044e ]

In some setups directories can have many (usually negative) dentries.
Hence __fsnotify_update_child_dentry_flags() function can take a
significant amount of time. Since the bulk of this function happens
under inode->i_lock this causes a significant contention on the lock
when we remove the watch from the directory as the
__fsnotify_update_child_dentry_flags() call from fsnotify_recalc_mask()
races with __fsnotify_update_child_dentry_flags() calls from
__fsnotify_parent() happening on children. This can lead upto softlockup
reports reported by users.

Fix the problem by calling fsnotify_update_children_dentry_flags() to
set PARENT_WATCHED flags only when parent starts watching children.

When parent stops watching children, clear false positive PARENT_WATCHED
flags lazily in __fsnotify_parent() for each accessed child.

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-19 14:52:23 +01:00
..
acpi
asm-generic
clocksource x86/hyperv: Fix hv tsc page based sched_clock for hibernation 2025-01-15 16:29:52 +01:00
crypto
drm Revert "drm/printer: Allow NULL data in devcoredump printer" 2024-11-24 00:23:06 +01:00
dt-bindings
keys
kunit
kvm
linux fsnotify: clear PARENT_WATCHED flags lazily 2025-01-19 14:52:23 +01:00
math-emu
media media: v4l2-core: v4l2-dv-timings: check cvt/gtf result 2024-12-17 13:24:20 +01:00
memory
misc
net Revert "net: tcp: bbrplus for 5.10" 2025-01-17 22:17:46 +01:00
pcmcia
ras
rdma
scsc
scsi
sdp
soc
sound
target
test
trace Revert "tcp: add accessors to read/set tp->snd_cwnd" 2024-12-18 15:30:18 +01:00
uapi include: Move videodev2_exynos_media.h to uapi/linux 2025-01-16 23:07:16 +01:00
variant1/linux
vdso
video
xen