• Michal Hocko's avatar
    memcg: do not check for mm in __mem_cgroup_count_vm_event · c95d26c2
    Michal Hocko authored
    The mm given to __mem_cgroup_count_vm_event() cannot be NULL because the
    function is either called from the page fault path or vma->vm_mm is used.
    So the check can be dropped.
    
    The check was introduced by commit 456f998e ("memcg: add the
    pagefault count into memcg stats") because the originally proposed patch
    used current->mm for shmem but this has been changed to vma->vm_mm later
    on without the check being removed (thanks to Hugh for this
    recollection).
    Signed-off-by: default avatarMichal Hocko <mhocko@suse.cz>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Ying Han <yinghan@google.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c95d26c2
memcontrol.c 146 KB