blob: f19889e56b472a82cab80c8b4dab67344f0cf23f [file] [log] [blame]
Aneesh Kumar K.V2bc64a22012-07-31 16:42:12 -07001/*
2 * Copyright IBM Corporation, 2012
3 * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2.1 of the GNU Lesser General Public License
7 * as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it would be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 *
13 */
14
15#ifndef _LINUX_HUGETLB_CGROUP_H
16#define _LINUX_HUGETLB_CGROUP_H
17
18#include <linux/res_counter.h>
19
20struct hugetlb_cgroup;
21
22#ifdef CONFIG_CGROUP_HUGETLB
23static inline bool hugetlb_cgroup_disabled(void)
24{
25 if (hugetlb_subsys.disabled)
26 return true;
27 return false;
28}
29
30#else
31static inline bool hugetlb_cgroup_disabled(void)
32{
33 return true;
34}
35
36#endif /* CONFIG_MEM_RES_CTLR_HUGETLB */
37#endif