diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-04-12 00:15:36 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-12 00:15:36 -0700 |
| commit | 3749bf2c1fb31ffd3f95b9843890a7132fa06c06 (patch) | |
| tree | c0064df2fe5702385a2ac39774d2919230bc6968 | |
| parent | 1fe10e2fe95d278cc83226abfb7fa4bf2adb92df (diff) | |
[PATCH] dmL remove __dm_request
From: Joe Thornber <thornber@redhat.com>
dm.c: remove __dm_request (merge with previous patch).
| -rw-r--r-- | drivers/md/dm.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 5ef7d9bd65bb..6dc34c8b4604 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -503,8 +503,13 @@ static void __split_bio(struct mapped_device *md, struct bio *bio) { 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_device *md, struct bio *bio) * 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, struct bio *bio) 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 *congested_data, int bdi_bits) 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 mapped_device *md, struct bio *c) while (c) { n = c->bi_next; c->bi_next = NULL; - __dm_request(md, c); + __split_bio(md, c); c = n; } } |
