block: change the request allocation/congestion logic to be sync/async based
[linux-2.6.git] / mm / backing-dev.c
index be68c95..493b468 100644 (file)
@@ -284,12 +284,12 @@ static wait_queue_head_t congestion_wqh[2] = {
        };
 
 
-void clear_bdi_congested(struct backing_dev_info *bdi, int rw)
+void clear_bdi_congested(struct backing_dev_info *bdi, int sync)
 {
        enum bdi_state bit;
-       wait_queue_head_t *wqh = &congestion_wqh[rw];
+       wait_queue_head_t *wqh = &congestion_wqh[sync];
 
-       bit = (rw == WRITE) ? BDI_write_congested : BDI_read_congested;
+       bit = sync ? BDI_sync_congested : BDI_async_congested;
        clear_bit(bit, &bdi->state);
        smp_mb__after_clear_bit();
        if (waitqueue_active(wqh))
@@ -297,11 +297,11 @@ void clear_bdi_congested(struct backing_dev_info *bdi, int rw)
 }
 EXPORT_SYMBOL(clear_bdi_congested);
 
-void set_bdi_congested(struct backing_dev_info *bdi, int rw)
+void set_bdi_congested(struct backing_dev_info *bdi, int sync)
 {
        enum bdi_state bit;
 
-       bit = (rw == WRITE) ? BDI_write_congested : BDI_read_congested;
+       bit = sync ? BDI_sync_congested : BDI_async_congested;
        set_bit(bit, &bdi->state);
 }
 EXPORT_SYMBOL(set_bdi_congested);