dm thin: fix a race in thin_dtr
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 5 Nov 2014 22:00:13 +0000 (17:00 -0500)
committerMike Snitzer <snitzer@redhat.com>
Thu, 13 Nov 2014 01:15:04 +0000 (20:15 -0500)
As long as struct thin_c is in the list, anyone can grab a reference of
it.  Consequently, we must wait for the reference count to drop to zero
*after* we remove the structure from the list, not before.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-thin.c

Simple merge