writeback: don't embed root bdi_writeback_congested in bdi_writeback
[cascardo/linux.git] / include / linux / backing-dev-defs.h
index a48d90e..a23209b 100644 (file)
@@ -50,10 +50,10 @@ enum wb_stat_item {
  */
 struct bdi_writeback_congested {
        unsigned long state;            /* WB_[a]sync_congested flags */
+       atomic_t refcnt;                /* nr of attached wb's and blkg */
 
 #ifdef CONFIG_CGROUP_WRITEBACK
        struct backing_dev_info *bdi;   /* the associated bdi */
-       atomic_t refcnt;                /* nr of attached wb's and blkg */
        int blkcg_id;                   /* ID of the associated blkcg */
        struct rb_node rb_node;         /* on bdi->cgwb_congestion_tree */
 #endif
@@ -150,11 +150,12 @@ struct backing_dev_info {
        atomic_long_t tot_write_bandwidth;
 
        struct bdi_writeback wb;  /* the root writeback info for this bdi */
-       struct bdi_writeback_congested wb_congested; /* its congested state */
 #ifdef CONFIG_CGROUP_WRITEBACK
        struct radix_tree_root cgwb_tree; /* radix tree of active cgroup wbs */
        struct rb_root cgwb_congested_tree; /* their congested states */
        atomic_t usage_cnt; /* counts both cgwbs and cgwb_contested's */
+#else
+       struct bdi_writeback_congested *wb_congested;
 #endif
        wait_queue_head_t wb_waitq;