]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
page_cgroup: add helper function to get swap_cgroup
authorBob Liu <lliubbo@gmail.com>
Fri, 13 Jan 2012 01:18:48 +0000 (17:18 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Jan 2012 04:13:07 +0000 (20:13 -0800)
commit9fb4b7cc0724f178d4b24a2a566ea1e7cb120b82
tree0f2db9102d46f5e5c8492864fb1bd21f2e7cd768
parent40f23a21a8501c1b2c65c50c19b516488ac31313
page_cgroup: add helper function to get swap_cgroup

There are multiple places which need to get the swap_cgroup address, so
add a helper function:

  static struct swap_cgroup *swap_cgroup_getsc(swp_entry_t ent,
                                struct swap_cgroup_ctrl **ctrl);

to simplify the code.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/page_cgroup.h
mm/memcontrol.c
mm/page_cgroup.c