]> git.baikalelectronics.ru Git - kernel.git/commit
dm cache metadata: fix cmd_read_lock() acquiring write lock
authorAhmed Samy <f.fallen45@gmail.com>
Sun, 17 Apr 2016 05:37:09 +0000 (05:37 +0000)
committerMike Snitzer <snitzer@redhat.com>
Sun, 17 Apr 2016 15:24:46 +0000 (11:24 -0400)
commita17567d2ae5385cc68e930069774bceb18f7091e
treee62ed5c8c4263e76c339804d74b47caff975076f
parentba10c980d1ec13f7f34f44c532cda4b9fa0079f1
dm cache metadata: fix cmd_read_lock() acquiring write lock

Commit ba10c980d1ec ("dm cache metadata: fix READ_LOCK macros and
cleanup WRITE_LOCK macros") uses down_write() instead of down_read() in
cmd_read_lock(), yet up_read() is used to release the lock in
READ_UNLOCK().  Fix it.

Fixes: ba10c980d1ec ("dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros")
Cc: stable@vger.kernel.org
Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-metadata.c