mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
memcg: remove NULL check from lookup_page_cgroup() result
The page_cgroup array is set up before even fork is initialized. I seriously doubt that this code executes before the array is alloc'd. Signed-off-by: Johannes Weiner <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Daisuke Nishimura <[email protected]> Cc: Balbir Singh <[email protected]> Cc: Minchan Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c14f35c70e
commit
af4a662144
1 changed files with 1 additions and 4 deletions
|
|
@ -2369,10 +2369,7 @@ static int mem_cgroup_charge_common(struct page *page, struct mm_struct *mm,
|
|||
}
|
||||
|
||||
pc = lookup_page_cgroup(page);
|
||||
/* can happen at boot */
|
||||
if (unlikely(!pc))
|
||||
return 0;
|
||||
prefetchw(pc);
|
||||
BUG_ON(!pc); /* XXX: remove this and move pc lookup into commit */
|
||||
|
||||
ret = __mem_cgroup_try_charge(mm, gfp_mask, &mem, oom, page_size);
|
||||
if (ret || !mem)
|
||||
|
|
|
|||
Loading…
Reference in a new issue