Skip to content

Commit

Permalink
cfq-iosched: fix compile problem with !CONFIG_CGROUP
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Jens Axboe committed Dec 3, 2009
1 parent 72f924f commit 2f5ea47
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions block/blk-cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

#include <linux/cgroup.h>

#ifdef CONFIG_BLK_CGROUP

struct blkio_cgroup {
struct cgroup_subsys_state css;
unsigned int weight;
Expand All @@ -41,6 +43,13 @@ struct blkio_group {
unsigned long sectors;
};

#else

struct blkio_group {
};

#endif

#define BLKIO_WEIGHT_MIN 100
#define BLKIO_WEIGHT_MAX 1000
#define BLKIO_WEIGHT_DEFAULT 500
Expand Down Expand Up @@ -69,6 +78,7 @@ extern struct blkio_group *blkiocg_lookup_group(struct blkio_cgroup *blkcg,
void blkiocg_update_blkio_group_stats(struct blkio_group *blkg,
unsigned long time, unsigned long sectors);
#else
struct cgroup;
static inline struct blkio_cgroup *
cgroup_to_blkio_cgroup(struct cgroup *cgroup) { return NULL; }

Expand Down

0 comments on commit 2f5ea47

Please sign in to comment.