Skip to content

Commit 2f5ea47

Browse files
author
Jens Axboe
committed
cfq-iosched: fix compile problem with !CONFIG_CGROUP
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
1 parent 72f924f commit 2f5ea47

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎block/blk-cgroup.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
#include <linux/cgroup.h>
1717

18+
#ifdef CONFIG_BLK_CGROUP
19+
1820
struct blkio_cgroup {
1921
struct cgroup_subsys_state css;
2022
unsigned int weight;
@@ -41,6 +43,13 @@ struct blkio_group {
4143
unsigned long sectors;
4244
};
4345

46+
#else
47+
48+
struct blkio_group {
49+
};
50+
51+
#endif
52+
4453
#define BLKIO_WEIGHT_MIN 100
4554
#define BLKIO_WEIGHT_MAX 1000
4655
#define BLKIO_WEIGHT_DEFAULT 500
@@ -69,6 +78,7 @@ extern struct blkio_group *blkiocg_lookup_group(struct blkio_cgroup *blkcg,
6978
void blkiocg_update_blkio_group_stats(struct blkio_group *blkg,
7079
unsigned long time, unsigned long sectors);
7180
#else
81+
struct cgroup;
7282
static inline struct blkio_cgroup *
7383
cgroup_to_blkio_cgroup(struct cgroup *cgroup) { return NULL; }
7484

0 commit comments

Comments
 (0)