fsnotify: lazy attach fsnotify_sb_info state to sb
authorAmir Goldstein <amir73il@gmail.com>
Sun, 17 Mar 2024 18:41:51 +0000 (20:41 +0200)
committerJan Kara <jack@suse.cz>
Thu, 4 Apr 2024 14:24:16 +0000 (16:24 +0200)
commit07a3b8d0bf726a1e49b050bbc6bd72f031e505fe
tree45d9153d780282b0d4f2999811a9d210b63e1d62
parentc9d4603b054f9a63c07c7012040af4c80adb2c60
fsnotify: lazy attach fsnotify_sb_info state to sb

Define a container struct fsnotify_sb_info to hold per-sb state,
including the reference to sb marks connector.

Allocate the fsnotify_sb_info state before attaching connector to any
object on the sb and free it only when killing sb.

This state is going to be used for storing per priority watched objects
counters.

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