File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -2925,8 +2925,6 @@ static void __dm_destroy(struct mapped_device *md, bool wait)
2925
2925
2926
2926
might_sleep ();
2927
2927
2928
- map = dm_get_live_table (md , & srcu_idx );
2929
-
2930
2928
spin_lock (& _minor_lock );
2931
2929
idr_replace (& _minor_idr , MINOR_ALLOCED , MINOR (disk_devt (dm_disk (md ))));
2932
2930
set_bit (DMF_FREEING , & md -> flags );
@@ -2940,14 +2938,14 @@ static void __dm_destroy(struct mapped_device *md, bool wait)
2940
2938
* do not race with internal suspend.
2941
2939
*/
2942
2940
mutex_lock (& md -> suspend_lock );
2941
+ map = dm_get_live_table (md , & srcu_idx );
2943
2942
if (!dm_suspended_md (md )) {
2944
2943
dm_table_presuspend_targets (map );
2945
2944
dm_table_postsuspend_targets (map );
2946
2945
}
2947
- mutex_unlock (& md -> suspend_lock );
2948
-
2949
2946
/* dm_put_live_table must be before msleep, otherwise deadlock is possible */
2950
2947
dm_put_live_table (md , srcu_idx );
2948
+ mutex_unlock (& md -> suspend_lock );
2951
2949
2952
2950
/*
2953
2951
* Rare, but there may be I/O requests still going to complete,
You can’t perform that action at this time.
0 commit comments