


---

 25-akpm/drivers/block/ll_rw_blk.c |   20 +++++++++++++-------
 25-akpm/include/linux/writeback.h |    1 +
 2 files changed, 14 insertions(+), 7 deletions(-)

diff -puN drivers/block/ll_rw_blk.c~clear_backing_dev_congested drivers/block/ll_rw_blk.c
--- 25/drivers/block/ll_rw_blk.c~clear_backing_dev_congested	2004-05-15 11:21:45.739983024 -0700
+++ 25-akpm/drivers/block/ll_rw_blk.c	2004-05-15 11:21:45.746981960 -0700
@@ -106,22 +106,28 @@ static void blk_queue_congestion_thresho
 	q->nr_congestion_off = nr;
 }
 
-/*
- * A queue has just exitted congestion.  Note this in the global counter of
- * congested queues, and wake up anyone who was waiting for requests to be
- * put back.
- */
-static void clear_queue_congested(request_queue_t *q, int rw)
+void clear_backing_dev_congested(struct backing_dev_info *bdi, int rw)
 {
 	enum bdi_state bit;
 	wait_queue_head_t *wqh = &congestion_wqh[rw];
 
 	bit = (rw == WRITE) ? BDI_write_congested : BDI_read_congested;
-	clear_bit(bit, &q->backing_dev_info.state);
+	clear_bit(bit, &bdi->state);
 	smp_mb__after_clear_bit();
 	if (waitqueue_active(wqh))
 		wake_up(wqh);
 }
+EXPORT_SYMBOL(clear_backing_dev_congested);
+
+/*
+ * A queue has just exitted congestion.  Note this in the global counter of
+ * congested queues, and wake up anyone who was waiting for requests to be
+ * put back.
+ */
+static void clear_queue_congested(request_queue_t *q, int rw)
+{
+	clear_backing_dev_congested(&q->backing_dev_info, rw);
+}
 
 /*
  * A queue has just entered congestion.  Flag that in the queue's VM-visible
diff -puN include/linux/writeback.h~clear_backing_dev_congested include/linux/writeback.h
--- 25/include/linux/writeback.h~clear_backing_dev_congested	2004-05-15 11:21:45.740982872 -0700
+++ 25-akpm/include/linux/writeback.h	2004-05-15 11:21:45.746981960 -0700
@@ -97,5 +97,6 @@ int do_writepages(struct address_space *
 extern int nr_pdflush_threads;	/* Global so it can be exported to sysctl
 				   read-only. */
 
+void clear_backing_dev_congested(struct backing_dev_info *bdi, int rw);
 
 #endif		/* WRITEBACK_H */

_
