Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347952
b: refs/heads/master
c: 2aab385
h: refs/heads/master
v: v3
  • Loading branch information
Joe Thornber authored and Alasdair G Kergon committed Dec 21, 2012
1 parent 2d9eea6 commit a88945d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f286ba0eede3d8f211e6029c2b52f2dbee7d7d35
refs/heads/master: 2aab38502d0e1bf6cf98183769e35a9ff999dcb1
19 changes: 5 additions & 14 deletions trunk/drivers/md/dm-thin.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,7 @@ static void overwrite_endio(struct bio *bio, int err)
/*
* This sends the bios in the cell back to the deferred_bios list.
*/
static void cell_defer(struct thin_c *tc, struct dm_bio_prison_cell *cell,
dm_block_t data_block)
static void cell_defer(struct thin_c *tc, struct dm_bio_prison_cell *cell)
{
struct pool *pool = tc->pool;
unsigned long flags;
Expand All @@ -528,12 +527,9 @@ static void cell_defer(struct thin_c *tc, struct dm_bio_prison_cell *cell,
*/
static void cell_defer_no_holder(struct thin_c *tc, struct dm_bio_prison_cell *cell)
{
struct bio_list bios;
struct pool *pool = tc->pool;
unsigned long flags;

bio_list_init(&bios);

spin_lock_irqsave(&pool->lock, flags);
dm_cell_release_no_holder(cell, &pool->deferred_bios);
spin_unlock_irqrestore(&pool->lock, flags);
Expand Down Expand Up @@ -586,7 +582,7 @@ static void process_prepared_mapping(struct dm_thin_new_mapping *m)
cell_defer_no_holder(tc, m->cell);
bio_endio(bio, 0);
} else
cell_defer(tc, m->cell, m->data_block);
cell_defer(tc, m->cell);

out:
list_del(&m->list);
Expand Down Expand Up @@ -1447,8 +1443,7 @@ static int thin_bio_map(struct dm_target *ti, struct bio *bio,
* of doing so. Just error it.
*/
bio_io_error(bio);
r = DM_MAPIO_SUBMITTED;
break;
return DM_MAPIO_SUBMITTED;
}
/* fall through */

Expand All @@ -1458,8 +1453,7 @@ static int thin_bio_map(struct dm_target *ti, struct bio *bio,
* provide the hint to load the metadata into cache.
*/
thin_defer_bio(tc, bio);
r = DM_MAPIO_SUBMITTED;
break;
return DM_MAPIO_SUBMITTED;

default:
/*
Expand All @@ -1468,11 +1462,8 @@ static int thin_bio_map(struct dm_target *ti, struct bio *bio,
* pool is switched to fail-io mode.
*/
bio_io_error(bio);
r = DM_MAPIO_SUBMITTED;
break;
return DM_MAPIO_SUBMITTED;
}

return r;
}

static int pool_is_congested(struct dm_target_callbacks *cb, int bdi_bits)
Expand Down

0 comments on commit a88945d

Please sign in to comment.