Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347945
b: refs/heads/master
c: 563af18
h: refs/heads/master
i:
  347943: 5d41052
v: v3
  • Loading branch information
Joe Thornber authored and Alasdair G Kergon committed Dec 21, 2012
1 parent 4b17532 commit 6a7f897
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: e8088073c9610af017fd47fddd104a2c3afb32e8
refs/heads/master: 563af186df08002d2600c4e718ad8f3bde109f53
11 changes: 7 additions & 4 deletions trunk/drivers/md/dm-thin.c
Original file line number Diff line number Diff line change
Expand Up @@ -2676,10 +2676,13 @@ static int thin_endio(struct dm_target *ti,
if (h->all_io_entry) {
INIT_LIST_HEAD(&work);
dm_deferred_entry_dec(h->all_io_entry, &work);
spin_lock_irqsave(&pool->lock, flags);
list_for_each_entry_safe(m, tmp, &work, list)
list_add(&m->list, &pool->prepared_discards);
spin_unlock_irqrestore(&pool->lock, flags);
if (!list_empty(&work)) {
spin_lock_irqsave(&pool->lock, flags);
list_for_each_entry_safe(m, tmp, &work, list)
list_add(&m->list, &pool->prepared_discards);
spin_unlock_irqrestore(&pool->lock, flags);
wake_worker(pool);
}
}

mempool_free(h, pool->endio_hook_pool);
Expand Down

0 comments on commit 6a7f897

Please sign in to comment.