diff options
| author | Mark Harmstone <maharmstone@fb.com> | 2026-03-23 17:17:01 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-04-21 04:01:43 +0200 |
| commit | 44366af74061793ee5ceef455a4f0e465892d0de (patch) | |
| tree | b58ff7eaa380e6382b40fb5def0184301da40ba9 /include/linux | |
| parent | 41e706c07ef9f752a08f0b9567176ac79441895f (diff) | |
btrfs: don't clobber errors in add_remap_tree_entries()
In add_remap_tree_entries(), we only process a certain number of entries
at a time, meaning we may need to loop.
But because we weren't checking the return value of btrfs_insert_empty_items()
within the loop, this meant that if the last iteration of the loop
succeeded but a previous iteration failed, we were erroneously returning
0.
Fix this by breaking the loop early if btrfs_insert_empty_items() fails.
Fixes: b56f35560b82 ("btrfs: handle setting up relocation of block group with remap-tree")
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
