diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 22:22:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 22:22:55 -0400 |
commit | 513de477a09f770e42ad042bf830565d9c73a158 (patch) | |
tree | 5a9924a8bffb4777d3df34ce2b05d564f3b567b6 /lib | |
parent | 62c8d922783a0fa41a9b4ca004f0467d6ca9be48 (diff) | |
parent | 3340808cf04faad7b87d6c6e13800825e5552b51 (diff) |
Merge branch 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core/debugobjects changes from Ingo Molnar:
"Not much happened: it includes a cleanup and an irq latency reduction
fixlet."
* 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
debugobjects: Fill_pool() returns void now
debugobjects: printk with irqs enabled
debugobjects: Remove unused return value from fill_pool()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/debugobjects.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 0ab9ae8057f0..d11808ca4bc4 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c | |||
@@ -79,30 +79,29 @@ static const char *obj_states[ODEBUG_STATE_MAX] = { | |||
79 | [ODEBUG_STATE_NOTAVAILABLE] = "not available", | 79 | [ODEBUG_STATE_NOTAVAILABLE] = "not available", |
80 | }; | 80 | }; |
81 | 81 | ||
82 | static int fill_pool(void) | 82 | static void fill_pool(void) |
83 | { | 83 | { |
84 | gfp_t gfp = GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN; | 84 | gfp_t gfp = GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN; |
85 | struct debug_obj *new; | 85 | struct debug_obj *new; |
86 | unsigned long flags; | 86 | unsigned long flags; |
87 | 87 | ||
88 | if (likely(obj_pool_free >= ODEBUG_POOL_MIN_LEVEL)) | 88 | if (likely(obj_pool_free >= ODEBUG_POOL_MIN_LEVEL)) |
89 | return obj_pool_free; | 89 | return; |
90 | 90 | ||
91 | if (unlikely(!obj_cache)) | 91 | if (unlikely(!obj_cache)) |
92 | return obj_pool_free; | 92 | return; |
93 | 93 | ||
94 | while (obj_pool_free < ODEBUG_POOL_MIN_LEVEL) { | 94 | while (obj_pool_free < ODEBUG_POOL_MIN_LEVEL) { |
95 | 95 | ||
96 | new = kmem_cache_zalloc(obj_cache, gfp); | 96 | new = kmem_cache_zalloc(obj_cache, gfp); |
97 | if (!new) | 97 | if (!new) |
98 | return obj_pool_free; | 98 | return; |
99 | 99 | ||
100 | raw_spin_lock_irqsave(&pool_lock, flags); | 100 | raw_spin_lock_irqsave(&pool_lock, flags); |
101 | hlist_add_head(&new->node, &obj_pool); | 101 | hlist_add_head(&new->node, &obj_pool); |
102 | obj_pool_free++; | 102 | obj_pool_free++; |
103 | raw_spin_unlock_irqrestore(&pool_lock, flags); | 103 | raw_spin_unlock_irqrestore(&pool_lock, flags); |
104 | } | 104 | } |
105 | return obj_pool_free; | ||
106 | } | 105 | } |
107 | 106 | ||
108 | /* | 107 | /* |
@@ -1052,10 +1051,10 @@ static int __init debug_objects_replace_static_objects(void) | |||
1052 | cnt++; | 1051 | cnt++; |
1053 | } | 1052 | } |
1054 | } | 1053 | } |
1054 | local_irq_enable(); | ||
1055 | 1055 | ||
1056 | printk(KERN_DEBUG "ODEBUG: %d of %d active objects replaced\n", cnt, | 1056 | printk(KERN_DEBUG "ODEBUG: %d of %d active objects replaced\n", cnt, |
1057 | obj_pool_used); | 1057 | obj_pool_used); |
1058 | local_irq_enable(); | ||
1059 | return 0; | 1058 | return 0; |
1060 | free: | 1059 | free: |
1061 | hlist_for_each_entry_safe(obj, node, tmp, &objects, node) { | 1060 | hlist_for_each_entry_safe(obj, node, tmp, &objects, node) { |