]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: only set disk to read-only once
authorJosh Durgin <josh.durgin@inktank.com>
Tue, 1 Oct 2013 03:10:04 +0000 (20:10 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Wed, 11 Jun 2014 01:09:25 +0000 (18:09 -0700)
commitef71d27e2b4365926ef6b8e762fb681f405b4829
tree67d9a9cdcb5c7f3fe45e1fab6393c130eb65857c
parentd92e6b331b46889a93b93789ffc785ff3d7c027c
rbd: only set disk to read-only once

rbd_open(), called every time the device is opened, calls
set_device_ro().  There's no reason to set the device read-only or
read-write every time it is opened. Just do this once during device
setup, using set_disk_ro() instead because the struct block_device
isn't available to us there.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
drivers/block/rbd.c