From: Joe Thornber Date: Fri, 7 Aug 2015 15:33:01 +0000 (+0100) Subject: dm btree remove: fix bug in remove_one() X-Git-Tag: Ubuntu-5.2.0-15.16~10876^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=aa0cd28d057fd4cb686fbdd2475a6a3f609dd581;p=mirror_ubuntu-eoan-kernel.git 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 Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/persistent-data/dm-btree-remove.c b/drivers/md/persistent-data/dm-btree-remove.c index 9836c0ae897c..9ca9eccd512f 100644 --- a/drivers/md/persistent-data/dm-btree-remove.c +++ b/drivers/md/persistent-data/dm-btree-remove.c @@ -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;