]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: remove unneeded mas_wr_walk() in mas_store_prealloc()
authorSidhartha Kumar <sidhartha.kumar@oracle.com>
Wed, 14 Aug 2024 16:19:43 +0000 (12:19 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 17 Aug 2024 00:53:20 +0000 (17:53 -0700)
commitcb07a6f198e91f29f91306fd6ded6abb16d9368f
treebf8ae8851289b4ec34bbc3ba681be7d22a3ce256
parentc7e8944d5bbe6ba53adb13b9eafca598b244e3b2
maple_tree: remove unneeded mas_wr_walk() in mas_store_prealloc()

Users of mas_store_prealloc() enter this function with nodes already
preallocated. This means the store type must be already set. We can then
remove the call to mas_wr_store_type() and initialize the write state to
continue the partial walk that was done when determining the store type.

Link: https://lkml.kernel.org/r/20240814161944.55347-17-sidhartha.kumar@oracle.com
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Sidhartha Kumar <sidhartha.kumar@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