diff options
| author | Jan Kara <jack@suse.cz> | 2026-01-19 15:54:33 +0100 |
|---|---|---|
| committer | Jan Kara <jack@suse.cz> | 2026-01-23 13:26:20 +0100 |
| commit | 94bd01253c3d5b1cd8955bdadeed24af02088094 (patch) | |
| tree | 76b67ef03edc7a27a0a964107b39da8f0a98eafa /include | |
| parent | 6c790212c588fddeb0d852f2790840753bb604b1 (diff) | |
fsnotify: Track inode connectors for a superblock
Introduce a linked list tracking all inode connectors for a superblock.
We will use this list when the superblock is getting shutdown to
properly clean up all the inode marks instead of relying on scanning all
inodes in the superblock which can get rather slow.
Suggested-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/fsnotify_backend.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 0d954ea7b179..95985400d3d8 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h @@ -553,7 +553,7 @@ struct fsnotify_mark_connector { /* Used listing heads to free after srcu period expires */ struct fsnotify_mark_connector *destroy_next; }; - struct hlist_head list; + struct hlist_head list; /* List of marks */ }; /* @@ -562,6 +562,9 @@ struct fsnotify_mark_connector { */ struct fsnotify_sb_info { struct fsnotify_mark_connector __rcu *sb_marks; + /* List of connectors for inode marks */ + struct list_head inode_conn_list; + spinlock_t list_lock; /* Lock protecting inode_conn_list */ /* * Number of inode/mount/sb objects that are being watched in this sb. * Note that inodes objects are currently double-accounted. |
