diff --git a/lib/maple_tree.c b/lib/maple_tree.c index b6d9dbfdab9d..f2f0e4ad80fe 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -6774,7 +6774,7 @@ void __mt_destroy(struct maple_tree *mt) if (xa_is_node(root)) mte_destroy_walk(root, mt); - mt->ma_flags = 0; + mt->ma_flags = mt_attr(mt); } EXPORT_SYMBOL_GPL(__mt_destroy);