mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 23:09:29 +02:00
btrfs: defrag: remove pointless list_del_init() in defrag_one_cluster()
There's no need to call list_del_init() against each entry when freeing the list, as the list is local and we are freeing the entry. 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:
committed by
David Sterba
parent
3f66b272ff
commit
217aeb1d50
+1
-3
@@ -1319,10 +1319,8 @@ static int defrag_one_cluster(struct btrfs_inode *inode,
|
||||
inode->root->fs_info->sectorsize_bits;
|
||||
}
|
||||
out:
|
||||
list_for_each_entry_safe(entry, tmp, &target_list, list) {
|
||||
list_del_init(&entry->list);
|
||||
list_for_each_entry_safe(entry, tmp, &target_list, list)
|
||||
kfree(entry);
|
||||
}
|
||||
if (ret >= 0)
|
||||
*last_scanned_ret = max(*last_scanned_ret, start + len);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user