]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: remove no longer used log_list member of struct btrfs_ordered_extent
authorFilipe Manana <fdmanana@suse.com>
Mon, 15 Jun 2020 09:36:48 +0000 (10:36 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:25 +0000 (12:55 +0200)
The 'log_list' member of an ordered extent was used keep track of which
ordered extents we needed to wait after logging metadata, but is not used
anymore since commit 294b75b7329854 ("btrfs: remove the logged extents
infrastructure"), as we now always wait on ordered extent completion
before logging metadata. So just remove it since it's doing nothing and
making each ordered extent structure waste more memory (2 pointers).

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
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/ordered-data.c
fs/btrfs/ordered-data.h

index c8bd7a4e67bb94c4d78cdc2762a27db064cedc5e..fd902996a1dbfd1f6f8701acc01a509edc8337eb 100644 (file)
@@ -217,7 +217,6 @@ static int __btrfs_add_ordered_extent(struct inode *inode, u64 file_offset,
        INIT_LIST_HEAD(&entry->root_extent_list);
        INIT_LIST_HEAD(&entry->work_list);
        init_completion(&entry->completion);
-       INIT_LIST_HEAD(&entry->log_list);
        INIT_LIST_HEAD(&entry->trans_list);
 
        trace_btrfs_ordered_extent_add(inode, entry);
@@ -449,7 +448,6 @@ void btrfs_put_ordered_extent(struct btrfs_ordered_extent *entry)
        trace_btrfs_ordered_extent_put(entry->inode, entry);
 
        if (refcount_dec_and_test(&entry->refs)) {
-               ASSERT(list_empty(&entry->log_list));
                ASSERT(list_empty(&entry->trans_list));
                ASSERT(list_empty(&entry->root_extent_list));
                ASSERT(RB_EMPTY_NODE(&entry->rb_node));
index 4a506c5598f8c243c397d1ca9f95e18ddb53d2da..435f93c46c32495884d4aac7a9a28e0e147ab455 100644 (file)
@@ -104,9 +104,6 @@ struct btrfs_ordered_extent {
        /* list of checksums for insertion when the extent io is done */
        struct list_head list;
 
-       /* If we need to wait on this to be done */
-       struct list_head log_list;
-
        /* If the transaction needs to wait on this ordered extent */
        struct list_head trans_list;