Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1b51e98 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Alasdair G Kergon
Browse files

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: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent fe0bdec6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}
}