Mikulas Patocka 60c856c8e2 dm snapshot: fix register_snapshot deadlock
register_snapshot() performs a GFP_KERNEL allocation while holding
_origins_lock for write, but that could write out dirty pages onto a
device that attempts to acquire _origins_lock for read, resulting in
deadlock.

So move the allocation up before taking the lock.

This path is not performance-critical, so it doesn't matter that we
allocate memory and free it if we find that we won't need it.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-10-30 13:33:12 +00:00
..
2008-10-21 07:48:21 -04:00
2008-10-27 08:39:52 -07:00
2008-10-20 08:52:40 -07:00
2008-10-26 10:27:01 +01:00
2008-10-22 01:19:39 +02:00
2008-10-26 09:35:05 -07:00
2008-08-26 00:19:28 +10:00
2008-10-21 07:48:33 -04:00
2008-10-23 00:43:47 -04:00
2008-10-21 07:48:37 -04:00
2008-10-26 23:09:27 -07:00
2008-10-16 11:21:30 -07:00
2008-10-21 15:49:55 +11:00
2008-10-25 04:07:14 -04:00
2008-10-23 00:11:07 -04:00
2008-09-03 15:55:32 -07:00
2008-10-23 09:35:18 -07:00
2008-10-20 08:52:36 -07:00
2008-10-23 09:19:47 -07:00