]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: remove log_extents_lock and logged_list from struct btrfs_root
authorFilipe Manana <fdmanana@suse.com>
Thu, 19 Oct 2023 11:52:18 +0000 (12:52 +0100)
committerDavid Sterba <dsterba@suse.com>
Fri, 15 Dec 2023 19:27:00 +0000 (20:27 +0100)
The logged_list[2] and log_extents_lock[2] members of struct btrfs_root
are no longer used, their last use was removed in commit 5636cf7d6dc8
("btrfs: remove the logged extents infrastructure"). So remove these
fields. This reduces the size of struct btrfs_root, on a release kernel,
from 1392 bytes down to 1352 bytes.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c

index 196c005c31f6fd1bdad6c09ae16c742e61322044..99fe28bc013bc8d730bd309809575a20e3835ff5 100644 (file)
@@ -224,9 +224,6 @@ struct btrfs_root {
 
        struct list_head root_list;
 
-       spinlock_t log_extents_lock[2];
-       struct list_head logged_list[2];
-
        spinlock_t inode_lock;
        /* red-black tree that keeps track of in-memory inodes */
        struct rb_root inode_tree;
index 62cb97f7c94fa26e0969707f595e07ffa9bb3937..7d8d175d5a59af52be584be5cab7d0a3d7abf050 100644 (file)
@@ -650,14 +650,10 @@ static void __setup_root(struct btrfs_root *root, struct btrfs_fs_info *fs_info,
        INIT_LIST_HEAD(&root->ordered_extents);
        INIT_LIST_HEAD(&root->ordered_root);
        INIT_LIST_HEAD(&root->reloc_dirty_list);
-       INIT_LIST_HEAD(&root->logged_list[0]);
-       INIT_LIST_HEAD(&root->logged_list[1]);
        spin_lock_init(&root->inode_lock);
        spin_lock_init(&root->delalloc_lock);
        spin_lock_init(&root->ordered_extent_lock);
        spin_lock_init(&root->accounting_lock);
-       spin_lock_init(&root->log_extents_lock[0]);
-       spin_lock_init(&root->log_extents_lock[1]);
        spin_lock_init(&root->qgroup_meta_rsv_lock);
        mutex_init(&root->objectid_mutex);
        mutex_init(&root->log_mutex);