aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-thin.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-thin.c')
-rw-r--r--drivers/md/dm-thin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index 8c5504c0e894..767417a28b6f 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -3622,14 +3622,14 @@ static void thin_dtr(struct dm_target *ti)
3622 struct thin_c *tc = ti->private; 3622 struct thin_c *tc = ti->private;
3623 unsigned long flags; 3623 unsigned long flags;
3624 3624
3625 thin_put(tc);
3626 wait_for_completion(&tc->can_destroy);
3627
3628 spin_lock_irqsave(&tc->pool->lock, flags); 3625 spin_lock_irqsave(&tc->pool->lock, flags);
3629 list_del_rcu(&tc->list); 3626 list_del_rcu(&tc->list);
3630 spin_unlock_irqrestore(&tc->pool->lock, flags); 3627 spin_unlock_irqrestore(&tc->pool->lock, flags);
3631 synchronize_rcu(); 3628 synchronize_rcu();
3632 3629
3630 thin_put(tc);
3631 wait_for_completion(&tc->can_destroy);
3632
3633 mutex_lock(&dm_thin_pool_table.mutex); 3633 mutex_lock(&dm_thin_pool_table.mutex);
3634 3634
3635 __pool_dec(tc->pool); 3635 __pool_dec(tc->pool);