dm snapshot: use mutex instead of rw_semaphore
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 23 Nov 2017 21:15:43 +0000 (16:15 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2019 11:17:59 +0000 (12:17 +0100)
commit0685a2565a8b5da7288d2107f993dba43e83efd8
tree7c5884983b9fc5bcc0612fc1f025576b908b7675
parent9e48f0c28dd505e39bd136ec92a042b311b127c6
dm snapshot: use mutex instead of rw_semaphore

[ Upstream commit ae1093be5a0ef997833e200a0dafb9ed0b1ff4fe ]

The rw_semaphore is acquired for read only in two places, neither is
performance-critical.  So replace it with a mutex -- which is more
efficient.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-snap.c