aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.h
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2008-10-30 09:33:12 -0400
committerAlasdair G Kergon <agk@redhat.com>2008-10-30 09:33:12 -0400
commit60c856c8e2f57a3f69c505735ef66e3719ea0bd6 (patch)
treea6295bec9c1fa01885ef14befa4ae3618f51ca57 /drivers/md/dm-snap.h
parentb34578a48459ed1bd5396631aaa4a65d6bcc7726 (diff)
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>
Diffstat (limited to 'drivers/md/dm-snap.h')
0 files changed, 0 insertions, 0 deletions