Преглед на файлове

dm table: drop reference at unbind

Move one dm_table_put() so that the last reference in the thread
gets dropped in __unbind().

This is required for a 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 <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Mikulas Patocka преди 16 години
родител
ревизия
a1b51e9867
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      drivers/md/dm.c

+ 1 - 1
drivers/md/dm.c

@@ -1330,8 +1330,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);
 	}
 }