This patch disables interrupt when taking map_lock to prevent
needless lockdep warnings in request-based dm.
request-based dm takes map_lock after taking queue_lock with
disabling interrupt:
spin_lock_irqsave(queue_lock)
q->request_fn() == dm_request_fn()
=> dm_get_table()
=> read_lock(map_lock)
while queue_lock could be taken in interrupt context.
So lockdep warns that a deadlock can happen:
write_lock(map_lock)
<interrupt>
spin_lock_irqsave(queue_lock)
q->request_fn() == dm_request_fn()
=> dm_get_table()
=> read_lock(map_lock)
Currently there is no such code path in request-based dm where
q->request_fn() is called from interrupt context, so no such deadlock
happens.
But such warning messages confuse users, so prevent them by disabling
interrupt when taking map_lock.