diff options
| author | Arnd Bergmann <[email protected]> | 2018-02-22 15:52:58 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2018-02-22 21:00:24 +0000 |
| commit | 04148187aa9df3626168f7429d2287997787e387 (patch) | |
| tree | 7a24a10f826607b0a1c4636fd2a803cb1c2d6ce8 /lib/debugobjects.c | |
| parent | debugobjects: Use global free list in __debug_check_no_obj_freed() (diff) | |
| download | kernel-04148187aa9df3626168f7429d2287997787e387.tar.gz kernel-04148187aa9df3626168f7429d2287997787e387.zip | |
debugobjects: Fix debug_objects_freed accounting
The removal of the batched object freeing has caused the debug_objects_freed
to become read-only, and the reading is inside an ifdef, so gcc warns that it
is completely unused without CONFIG_DEBUG_FS:
lib/debugobjects.c:71:14: error: 'debug_objects_freed' defined but not used [-Werror=unused-variable]
Assuming we are still interested in this number, this adds back code to
keep track of the freed objects.
Fixes: 636e1970fd7d ("debugobjects: Use global free list in free_object()")
Suggested-by: Waiman Long <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Yang Shi <[email protected]>
Acked-by: Waiman Long <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'lib/debugobjects.c')
| -rw-r--r-- | lib/debugobjects.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index faab2c4ea024..105ecfc47d8c 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -233,6 +233,7 @@ static void free_obj_work(struct work_struct *work) */ if (obj_nr_tofree) { hlist_move_list(&obj_to_free, &tofree); + debug_objects_freed += obj_nr_tofree; obj_nr_tofree = 0; } raw_spin_unlock_irqrestore(&pool_lock, flags); |
