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