mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
dm btree remove: fix bug in remove_one()
remove_one() was not incrementing the key for the beginning of the
range, so not all entries were being removed. This resulted in
discards that were not unmapping all blocks.
Fixes: 4ec331c3ea ("dm btree: add dm_btree_remove_leaves()")
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
committed by
Mike Snitzer
parent
bd4aaf8f9b
commit
aa0cd28d05
@@ -689,6 +689,7 @@ static int remove_one(struct dm_btree_info *info, dm_block_t root,
|
||||
value_ptr(n, index));
|
||||
|
||||
delete_at(n, index);
|
||||
keys[last_level] = k + 1ull;
|
||||
|
||||
} else
|
||||
r = -ENODATA;
|
||||
|
||||
Reference in New Issue
Block a user