mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
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> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
d5b675c30a
commit
3f66b272ff
|
|
@ -1093,7 +1093,7 @@ static int defrag_collect_targets(struct btrfs_inode *inode,
|
|||
struct defrag_target_range *tmp;
|
||||
|
||||
list_for_each_entry_safe(entry, tmp, target_list, list) {
|
||||
list_del_init(&entry->list);
|
||||
list_del(&entry->list);
|
||||
kfree(entry);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user