Skip to content

Commit c594e27

Browse files
committed
btrfs: defrag: use simple list_del() in defrag_collect_targets()
When freeing the entries from the list there is no need to initialize the list member in an entry, since we are immediately freeing it. So use simple list_del() instead of list_del_init(). Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com>
1 parent d65ad30 commit c594e27

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/btrfs/defrag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ static int defrag_collect_targets(struct btrfs_inode *inode,
10931093
struct defrag_target_range *tmp;
10941094

10951095
list_for_each_entry_safe(entry, tmp, target_list, list) {
1096-
list_del_init(&entry->list);
1096+
list_del(&entry->list);
10971097
kfree(entry);
10981098
}
10991099
}

0 commit comments

Comments
 (0)