]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - include/linux/swap_cgroup.h
UBUNTU: SAUCE: LSM stacking: procfs: add smack subdir to attrs
[mirror_ubuntu-artful-kernel.git] / include / linux / swap_cgroup.h
CommitLineData
5d1ea48b
JW
1#ifndef __LINUX_SWAP_CGROUP_H
2#define __LINUX_SWAP_CGROUP_H
52d4b9ac 3
27a7faa0 4#include <linux/swap.h>
97572751 5
c255a458 6#ifdef CONFIG_MEMCG_SWAP
5d1ea48b 7
02491447
DN
8extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent,
9 unsigned short old, unsigned short new);
38d8b4e6
HY
10extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id,
11 unsigned int nr_ents);
9fb4b7cc 12extern unsigned short lookup_swap_cgroup_id(swp_entry_t ent);
27a7faa0
KH
13extern int swap_cgroup_swapon(int type, unsigned long max_pages);
14extern void swap_cgroup_swapoff(int type);
5d1ea48b 15
27a7faa0 16#else
27a7faa0
KH
17
18static inline
38d8b4e6
HY
19unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id,
20 unsigned int nr_ents)
27a7faa0 21{
a3b2d692 22 return 0;
27a7faa0
KH
23}
24
25static inline
9fb4b7cc 26unsigned short lookup_swap_cgroup_id(swp_entry_t ent)
27a7faa0 27{
a3b2d692 28 return 0;
27a7faa0
KH
29}
30
31static inline int
32swap_cgroup_swapon(int type, unsigned long max_pages)
33{
34 return 0;
35}
36
37static inline void swap_cgroup_swapoff(int type)
38{
39 return;
40}
41
c255a458 42#endif /* CONFIG_MEMCG_SWAP */
6b3ae58e 43
5d1ea48b 44#endif /* __LINUX_SWAP_CGROUP_H */