Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

debugobjects: Delete a piece of redundant code

The statically allocated objects are all located in obj_static_pool[],
the whole memory of obj_static_pool[] will be reclaimed later. Therefore,
there is no need to split the remaining statically nodes in list obj_pool
into isolated ones, no one will use them anymore. Just write
INIT_HLIST_HEAD(&obj_pool) is enough. Since hlist_move_list() directly
discards the old list, even this can be omitted.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240911083521.2257-2-thunder.leizhen@huawei.com
Link: https://lore.kernel.org/all/20241007164913.009849239@linutronix.de


authored by

Zhen Lei and committed by
Thomas Gleixner
a0ae9504 9852d85e

+4 -4
+4 -4
lib/debugobjects.c
··· 1325 1325 * active object references. 1326 1326 */ 1327 1327 1328 - /* Remove the statically allocated objects from the pool */ 1329 - hlist_for_each_entry_safe(obj, tmp, &obj_pool, node) 1330 - hlist_del(&obj->node); 1331 - /* Move the allocated objects to the pool */ 1328 + /* 1329 + * Replace the statically allocated objects list with the allocated 1330 + * objects list. 1331 + */ 1332 1332 hlist_move_list(&objects, &obj_pool); 1333 1333 1334 1334 /* Replace the active object references */