Skip to content

Commit 9ca9b86

Browse files
josefbacikkdave
authored andcommitted
btrfs: remove detached list from btrfs_backref_cache
We don't ever look at this list, remove it. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent aa4fd87 commit 9ca9b86

File tree

3 files changed

+0
-5
lines changed

3 files changed

+0
-5
lines changed

fs/btrfs/backref.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3021,7 +3021,6 @@ void btrfs_backref_init_cache(struct btrfs_fs_info *fs_info,
30213021
cache->rb_root = RB_ROOT;
30223022
for (i = 0; i < BTRFS_MAX_LEVEL; i++)
30233023
INIT_LIST_HEAD(&cache->pending[i]);
3024-
INIT_LIST_HEAD(&cache->detached);
30253024
INIT_LIST_HEAD(&cache->pending_edge);
30263025
INIT_LIST_HEAD(&cache->useless_node);
30273026
cache->fs_info = fs_info;
@@ -3158,7 +3157,6 @@ void btrfs_backref_release_cache(struct btrfs_backref_cache *cache)
31583157

31593158
ASSERT(list_empty(&cache->pending_edge));
31603159
ASSERT(list_empty(&cache->useless_node));
3161-
ASSERT(list_empty(&cache->detached));
31623160
ASSERT(!cache->nr_nodes);
31633161
ASSERT(!cache->nr_edges);
31643162
}

fs/btrfs/backref.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,6 @@ struct btrfs_backref_cache {
393393
* level blocks may not reflect the new location
394394
*/
395395
struct list_head pending[BTRFS_MAX_LEVEL];
396-
/* List of detached backref node. */
397-
struct list_head detached;
398396

399397
u64 last_trans;
400398

fs/btrfs/relocation.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@ static bool handle_useless_nodes(struct reloc_control *rc,
367367
* cache to avoid unnecessary backref lookup.
368368
*/
369369
if (cur->level > 0) {
370-
list_add(&cur->list, &cache->detached);
371370
cur->detached = 1;
372371
} else {
373372
rb_erase(&cur->rb_node, &cache->rb_root);

0 commit comments

Comments
 (0)