Commit cd5acf0b445030cd8b5bfd818f464997652485e5

Authored by Joe Thornber
Committed by Mike Snitzer
1 parent c9ec5d7c7b

dm btree: use pop_frame in dm_btree_del to cleanup code

Remove a visited leaf straight away from the stack, rather than
marking all it's children as visited and letting it get removed on the
next iteration.  May also offer a micro optimisation in dm_btree_del.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/md/persistent-data/dm-btree.c
... ... @@ -287,7 +287,7 @@
287 287 info->value_type.dec(info->value_type.context,
288 288 value_ptr(f->n, i));
289 289 }
290   - f->current_child = f->nr_children;
  290 + pop_frame(s);
291 291 }
292 292 }
293 293