Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105907
b: refs/heads/master
c: b76734e
h: refs/heads/master
i:
  105905: f0100c5
  105903: e42919d
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Jul 25, 2008
1 parent 3eee7ee commit 076a587
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9b0ed51483cc2fc42bb801b6675c4231b0e4634
refs/heads/master: b76734e5e34e1889ab9fc5f3756570b1129f0f50
8 changes: 4 additions & 4 deletions trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ static int mem_cgroup_charge_common(struct page *page, struct mm_struct *mm,
* The page_cgroup exists and
* the page has already been accounted.
*/
if (pc) {
if (unlikely(pc)) {
VM_BUG_ON(pc->page != page);
VM_BUG_ON(!pc->mem_cgroup);
unlock_page_cgroup(page);
Expand All @@ -559,7 +559,7 @@ static int mem_cgroup_charge_common(struct page *page, struct mm_struct *mm,
unlock_page_cgroup(page);

pc = kmem_cache_alloc(page_cgroup_cache, gfp_mask);
if (pc == NULL)
if (unlikely(pc == NULL))
goto err;

/*
Expand Down Expand Up @@ -616,7 +616,7 @@ static int mem_cgroup_charge_common(struct page *page, struct mm_struct *mm,
pc->flags = PAGE_CGROUP_FLAG_ACTIVE;

lock_page_cgroup(page);
if (page_get_page_cgroup(page)) {
if (unlikely(page_get_page_cgroup(page))) {
unlock_page_cgroup(page);
/*
* Another charge has been added to this page already.
Expand Down Expand Up @@ -690,7 +690,7 @@ __mem_cgroup_uncharge_common(struct page *page, enum charge_type ctype)
*/
lock_page_cgroup(page);
pc = page_get_page_cgroup(page);
if (!pc)
if (unlikely(!pc))
goto unlock;

VM_BUG_ON(pc->page != page);
Expand Down

0 comments on commit 076a587

Please sign in to comment.