]> git.karo-electronics.de Git - karo-tx-linux.git/commit
page_cgroup: add helper function to get swap_cgroup
authorBob Liu <lliubbo@gmail.com>
Fri, 16 Dec 2011 04:50:38 +0000 (15:50 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 19 Dec 2011 07:19:51 +0000 (18:19 +1100)
commitda7d8f3992c1541cda015cf2a839b24a32054781
treefd63c11ca7c6580a3407b005f1dec44742e3eda5
parentb72f6a618c6a6cc537ae08d08344a21a646b3045
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>
mm/page_cgroup.c