diff options
-rw-r--r-- | drivers/md/dm-thin.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 068607828691..8c3d048dd319 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c | |||
@@ -1194,7 +1194,6 @@ static void retry_bios_on_resume(struct pool *pool, struct dm_bio_prison_cell *c | |||
1194 | static void process_discard(struct thin_c *tc, struct bio *bio) | 1194 | static void process_discard(struct thin_c *tc, struct bio *bio) |
1195 | { | 1195 | { |
1196 | int r; | 1196 | int r; |
1197 | unsigned long flags; | ||
1198 | struct pool *pool = tc->pool; | 1197 | struct pool *pool = tc->pool; |
1199 | struct dm_bio_prison_cell *cell, *cell2; | 1198 | struct dm_bio_prison_cell *cell, *cell2; |
1200 | struct dm_cell_key key, key2; | 1199 | struct dm_cell_key key, key2; |
@@ -1235,12 +1234,9 @@ static void process_discard(struct thin_c *tc, struct bio *bio) | |||
1235 | m->cell2 = cell2; | 1234 | m->cell2 = cell2; |
1236 | m->bio = bio; | 1235 | m->bio = bio; |
1237 | 1236 | ||
1238 | if (!dm_deferred_set_add_work(pool->all_io_ds, &m->list)) { | 1237 | if (!dm_deferred_set_add_work(pool->all_io_ds, &m->list)) |
1239 | spin_lock_irqsave(&pool->lock, flags); | 1238 | pool->process_prepared_discard(m); |
1240 | list_add_tail(&m->list, &pool->prepared_discards); | 1239 | |
1241 | spin_unlock_irqrestore(&pool->lock, flags); | ||
1242 | wake_worker(pool); | ||
1243 | } | ||
1244 | } else { | 1240 | } else { |
1245 | inc_all_io_entry(pool, bio); | 1241 | inc_all_io_entry(pool, bio); |
1246 | cell_defer_no_holder(tc, cell); | 1242 | cell_defer_no_holder(tc, cell); |