aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r--block/blk-cgroup.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index 84bf745fa775..8ccc20464dae 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -15,7 +15,13 @@
15 15
16#include <linux/cgroup.h> 16#include <linux/cgroup.h>
17 17
18#ifdef CONFIG_BLK_CGROUP 18#if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE)
19
20#ifndef CONFIG_BLK_CGROUP
21/* When blk-cgroup is a module, its subsys_id isn't a compile-time constant */
22extern struct cgroup_subsys blkio_subsys;
23#define blkio_subsys_id blkio_subsys.subsys_id
24#endif
19 25
20struct blkio_cgroup { 26struct blkio_cgroup {
21 struct cgroup_subsys_state css; 27 struct cgroup_subsys_state css;
@@ -91,7 +97,7 @@ static inline void blkiocg_update_blkio_group_dequeue_stats(
91 struct blkio_group *blkg, unsigned long dequeue) {} 97 struct blkio_group *blkg, unsigned long dequeue) {}
92#endif 98#endif
93 99
94#ifdef CONFIG_BLK_CGROUP 100#if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE)
95extern struct blkio_cgroup blkio_root_cgroup; 101extern struct blkio_cgroup blkio_root_cgroup;
96extern struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup); 102extern struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup);
97extern void blkiocg_add_blkio_group(struct blkio_cgroup *blkcg, 103extern void blkiocg_add_blkio_group(struct blkio_cgroup *blkcg,