dm snapshot: only take lock for statustype info not table
commit5f5d50a0f5530e5a6df52755c74ec5a47829f8cc
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 10 Dec 2009 23:51:53 +0000 (10 23:51 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 22:04:59 +0000 (18 14:04 -0800)
treeb9137d06ecee4ccea4be7b8c565b45bc86d196ef
parent5db89cf4ea748e1c2d29d52175b2bace466078c7
dm snapshot: only take lock for statustype info not table

commit 94e76572b5dd37b1f0f4b3742ee8a565daead932 upstream.

Take snapshot lock only for STATUSTYPE_INFO, not STATUSTYPE_TABLE.

Commit 4c6fff445d7aa753957856278d4d93bcad6e2c14
(dm-snapshot-lock-snapshot-while-supplying-status.patch)
introduced this use of the lock, but userspace applications using
libdevmapper have been found to request STATUSTYPE_TABLE while the device
is suspended and the lock is already held, leading to deadlock.  Since
the lock is not necessary in this case, don't try to take it.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/dm-snap.c