may miss to set node dead on destroy
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 17 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | maple_tree: may miss to set node dead on destroylib/ | +2 | 4 replies | |
| 2/3 | maple_tree: restart walk on correct statuslib/ | +1 | 1 reply | |
| 3/3 | maple_tree: assert retrieving new value on a tree with only root nodetools/ | +24 | 4 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Liam R. Howlett |
|---|---|
| 1/3 | |
| 2/3 | R-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] may miss to set node dead on destroy
Per my understanding, on destroy we should set each node dead. But current code miss this when the maple tree has only the root node.
The reason is mt_destroy_walk() leverage mte_destroy_descend() to set node dead, but this is skipped since the only root node is a leaf.
Patch 1 fixes this.
When adding a test case, I found we always get the new value even we leave the old root node not dead. It turns out we always re-walk the tree in mas_walk(). It looks like a typo on the status check of mas_walk().
Patch 2 fixes this.
Patch 3 add a test case to assert retrieving new value when overwriting the whole range to a tree with only root node
Wei Yang (3):
maple_tree: may miss to set node dead on destroy
maple_tree: restart walk on correct status
maple_tree: assert retrieving new value on a tree with only root node
lib/maple_tree.c | 4 +++- tools/testing/radix-tree/maple.c | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1