mm/kmemleak: move the initialisation of object to __link_object
authorLiu Shixin <liushixin2@huawei.com>
Mon, 23 Oct 2023 02:51:25 +0000 (10:51 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 25 Oct 2023 23:47:13 +0000 (16:47 -0700)
commit245245c2fffd0050772a3f30ba50e2be92537a32
treed1dda12ec9c4f239beb7c8fe3f8f0035dcd5147e
parent5e4fc577db2514fee3cc2729415d0e2589d5d056
mm/kmemleak: move the initialisation of object to __link_object

In patch (mm: kmemleak: split __create_object into two functions), the
initialisation of object has been splited in two places.  Catalin said it
feels a bit weird and error prone.  So leave __alloc_object() to just do
the actual allocation and let __link_object() do the full initialisation.

Link: https://lkml.kernel.org/r/20231023025125.90972-1-liushixin2@huawei.com
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Suggested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/kmemleak.c