]> git.baikalelectronics.ru Git - kernel.git/commit
dm cache policy mq: protect residency method with existing mutex
authorJoe Thornber <ejt@redhat.com>
Mon, 21 Oct 2013 10:44:57 +0000 (11:44 +0100)
committerMike Snitzer <snitzer@redhat.com>
Sat, 9 Nov 2013 22:54:34 +0000 (17:54 -0500)
commit374d9347deaf36a1586355c32e2bde0d511610a3
treee150c06aff63538e6c64ff29a88f6afdb9d9fe20
parent7040aa80d0bf7a8cac4bb36bcf7721a8f9419109
dm cache policy mq: protect residency method with existing mutex

It is safe to use a mutex in mq_residency() at this point since it is
only called from ioctl context.  But future-proof mq_residency() by
using might_sleep() to catch new contexts that cannot sleep.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-policy-mq.c