mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
memcg: add hints for branch
Showing brach direction for obvious conditions. Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Balbir Singh <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Li Zefan <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: YAMAMOTO Takashi <[email protected]> Cc: Paul Menage <[email protected]> Cc: David Rientjes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c9b0ed5148
commit
b76734e5e3
1 changed files with 4 additions and 4 deletions
|
|
@ -550,7 +550,7 @@ retry:
|
|||
* 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);
|
||||
|
|
@ -559,7 +559,7 @@ retry:
|
|||
unlock_page_cgroup(page);
|
||||
|
||||
pc = kmem_cache_alloc(page_cgroup_cache, gfp_mask);
|
||||
if (pc == NULL)
|
||||
if (unlikely(pc == NULL))
|
||||
goto err;
|
||||
|
||||
/*
|
||||
|
|
@ -616,7 +616,7 @@ retry:
|
|||
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.
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue