maple_tree: remove mas_destroy() from mas_nomem()
authorSidhartha Kumar <sidhartha.kumar@oracle.com>
Wed, 14 Aug 2024 16:19:32 +0000 (12:19 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 2 Sep 2024 03:26:15 +0000 (20:26 -0700)
commit3cd9e92e009de9a036cbf9ec27bad33367fca6f3
treea127ee9992e6b91e003befeb9a365db5919d00f1
parent5d659bbb52a24f91cc6c0cf546ffcc0faa7e8f1a
maple_tree: remove mas_destroy() from mas_nomem()

Separate call to mas_destroy() from mas_nomem() so we can check for no
memory errors without destroying the current maple state in
mas_store_gfp().  We then add calls to mas_destroy() to callers of
mas_nomem().

Link: https://lkml.kernel.org/r/20240814161944.55347-6-sidhartha.kumar@oracle.com
Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c
tools/testing/radix-tree/maple.c