summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2013-01-21 09:01:27 +0100
committerPekka Enberg <penberg@kernel.org>2013-04-02 08:42:17 +0200
commit338b2642290ef3193229ece8cfc776ac4fe8869d (patch)
tree4859bf45131f645f1845552a1ab33fdc4ea31af8 /mm
parentslub: correct to calculate num of acquired objects in get_partial_node() (diff)
downloadlinux-338b2642290ef3193229ece8cfc776ac4fe8869d.tar.xz
linux-338b2642290ef3193229ece8cfc776ac4fe8869d.zip
slub: add 'likely' macro to inc_slabs_node()
After boot phase, 'n' always exist. So add 'likely' macro for helping compiler. Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to '')
-rw-r--r--mm/slub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 8f73593d4f21..21b3f004f614 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1005,7 +1005,7 @@ static inline void inc_slabs_node(struct kmem_cache *s, int node, int objects)
* dilemma by deferring the increment of the count during
* bootstrap (see early_kmem_cache_node_alloc).
*/
- if (n) {
+ if (likely(n)) {
atomic_long_inc(&n->nr_slabs);
atomic_long_add(objects, &n->total_objects);
}