fsnotify: create helper fsnotify_update_sb_watchers()
authorAmir Goldstein <amir73il@gmail.com>
Sun, 17 Mar 2024 18:41:50 +0000 (20:41 +0200)
committerJan Kara <jack@suse.cz>
Thu, 4 Apr 2024 14:24:16 +0000 (16:24 +0200)
commitc9d4603b054f9a63c07c7012040af4c80adb2c60
treed5e680ee1e1ee8b5ec51a0ae5675dbd44ccda5f3
parent687c217c6aa2c24e6ddf98cc7f86a5b986e5918d
fsnotify: create helper fsnotify_update_sb_watchers()

We would like to count watched objects by priority group, so we will need
to update the watched object counter after adding/removing marks.

Create a helper fsnotify_update_sb_watchers() and call it after
attaching/detaching a mark, instead of fsnotify_{get,put}_sb_watchers()
only after attaching/detaching a connector.

Soon, we will use this helper to count watched objects by the highest
watching priority group.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <20240317184154.1200192-7-amir73il@gmail.com>
fs/notify/mark.c
include/linux/fsnotify_backend.h