]> git.kernelconcepts.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>
Tue, 20 Dec 2011 07:44:02 +0000 (18:44 +1100)
commit39cbca51ac68f97936645db3fc70cc0c739c4242
tree16aa0b8e93cbfc2946ec3cb85cb13755f7ddea4a
parent68298a18dbc981237cf27cdbbb4168b644eb78a4
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