
From: Joe Thornber <thornber@redhat.com>

dm.c: remove __dm_request (merge with previous patch).


---

 drivers/md/dm.c |   23 ++++++++---------------
 1 files changed, 8 insertions(+), 15 deletions(-)

diff -puN drivers/md/dm.c~dm-remove-__dm_request drivers/md/dm.c
--- 25/drivers/md/dm.c~dm-remove-__dm_request	2004-03-09 01:59:05.000000000 -0800
+++ 25-akpm/drivers/md/dm.c	2004-03-09 01:59:05.000000000 -0800
@@ -503,8 +503,13 @@ static void __split_bio(struct mapped_de
 {
 	struct clone_info ci;
 
-	ci.md = md;
 	ci.map = dm_get_table(md);
+	if (!ci.map) {
+		bio_io_error(bio, bio->bi_size);
+		return;
+	}
+
+	ci.md = md;
 	ci.bio = bio;
 	ci.io = alloc_io(md);
 	ci.io->error = 0;
@@ -527,17 +532,6 @@ static void __split_bio(struct mapped_de
  * CRUD END
  *---------------------------------------------------------------*/
 
-
-static inline void __dm_request(struct mapped_device *md, struct bio *bio)
-{
-	if (!md->map) {
-		bio_io_error(bio, bio->bi_size);
-		return;
-	}
-
-	__split_bio(md, bio);
-}
-
 /*
  * The request function that just remaps the bio built up by
  * dm_merge_bvec.
@@ -576,7 +570,7 @@ static int dm_request(request_queue_t *q
 		down_read(&md->lock);
 	}
 
-	__dm_request(md, bio);
+	__split_bio(md, bio);
 	up_read(&md->lock);
 	return 0;
 }
@@ -588,7 +582,6 @@ static int dm_any_congested(void *conges
 	struct dm_table *map = dm_get_table(md);
 
 	if (!map || test_bit(DMF_BLOCK_IO, &md->flags))
-		/* FIXME: shouldn't suspended count a congested ? */
 		r = bdi_bits;
 	else
 		r = dm_table_any_congested(map, bdi_bits);
@@ -847,7 +840,7 @@ static void __flush_deferred_io(struct m
 	while (c) {
 		n = c->bi_next;
 		c->bi_next = NULL;
-		__dm_request(md, c);
+		__split_bio(md, c);
 		c = n;
 	}
 }

_
