From: Mikulas Patocka Move one dm_table_put() so that the last reference in the thread gets dropped in __unbind(). This is required for the following patch, dm-table-rework-reference-counting.patch, which will change the logic in such a way that table destructor is called only at specific points in the code. Signed-off-by: Mikulas Patocka Signed-off-by: Alasdair G Kergon --- drivers/md/dm.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.28-rc5/drivers/md/dm.c =================================================================== --- linux-2.6.28-rc5.orig/drivers/md/dm.c 2008-11-17 09:18:06.000000000 +0000 +++ linux-2.6.28-rc5/drivers/md/dm.c 2008-11-17 09:19:19.000000000 +0000 @@ -1328,8 +1328,8 @@ void dm_put(struct mapped_device *md) dm_table_presuspend_targets(map); dm_table_postsuspend_targets(map); } - __unbind(md); dm_table_put(map); + __unbind(md); free_dev(md); } }