if (err)
return err;
+ bdi->wb_congested.state = 0;
+ bdi->wb.congested = &bdi->wb_congested;
+
return 0;
}
EXPORT_SYMBOL(bdi_init);
wait_queue_head_t *wqh = &congestion_wqh[sync];
bit = sync ? WB_sync_congested : WB_async_congested;
- if (test_and_clear_bit(bit, &bdi->wb.state))
+ if (test_and_clear_bit(bit, &bdi->wb.congested->state))
atomic_dec(&nr_bdi_congested[sync]);
smp_mb__after_atomic();
if (waitqueue_active(wqh))
enum wb_state bit;
bit = sync ? WB_sync_congested : WB_async_congested;
- if (!test_and_set_bit(bit, &bdi->wb.state))
+ if (!test_and_set_bit(bit, &bdi->wb.congested->state))
atomic_inc(&nr_bdi_congested[sync]);
}
EXPORT_SYMBOL(set_bdi_congested);