aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/memcontrol.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index f46b8615de6c..04ded27f6226 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -550,7 +550,7 @@ retry:
550 * The page_cgroup exists and 550 * The page_cgroup exists and
551 * the page has already been accounted. 551 * the page has already been accounted.
552 */ 552 */
553 if (pc) { 553 if (unlikely(pc)) {
554 VM_BUG_ON(pc->page != page); 554 VM_BUG_ON(pc->page != page);
555 VM_BUG_ON(!pc->mem_cgroup); 555 VM_BUG_ON(!pc->mem_cgroup);
556 unlock_page_cgroup(page); 556 unlock_page_cgroup(page);
@@ -559,7 +559,7 @@ retry:
559 unlock_page_cgroup(page); 559 unlock_page_cgroup(page);
560 560
561 pc = kmem_cache_alloc(page_cgroup_cache, gfp_mask); 561 pc = kmem_cache_alloc(page_cgroup_cache, gfp_mask);
562 if (pc == NULL) 562 if (unlikely(pc == NULL))
563 goto err; 563 goto err;
564 564
565 /* 565 /*
@@ -616,7 +616,7 @@ retry:
616 pc->flags = PAGE_CGROUP_FLAG_ACTIVE; 616 pc->flags = PAGE_CGROUP_FLAG_ACTIVE;
617 617
618 lock_page_cgroup(page); 618 lock_page_cgroup(page);
619 if (page_get_page_cgroup(page)) { 619 if (unlikely(page_get_page_cgroup(page))) {
620 unlock_page_cgroup(page); 620 unlock_page_cgroup(page);
621 /* 621 /*
622 * Another charge has been added to this page already. 622 * Another charge has been added to this page already.
@@ -690,7 +690,7 @@ __mem_cgroup_uncharge_common(struct page *page, enum charge_type ctype)
690 */ 690 */
691 lock_page_cgroup(page); 691 lock_page_cgroup(page);
692 pc = page_get_page_cgroup(page); 692 pc = page_get_page_cgroup(page);
693 if (!pc) 693 if (unlikely(!pc))
694 goto unlock; 694 goto unlock;
695 695
696 VM_BUG_ON(pc->page != page); 696 VM_BUG_ON(pc->page != page);