rbd: move calls that may sleep out of spin lock range
get_user() and set_disk_ro() may allocate memory, leading to a potential deadlock if theye are called while a spin lock is held. Move the acquisition and release of rbd_dev->lock from rbd_ioctl() into rbd_ioctl_set_ro(), so it can occur between get_user() and set_disk_ro(). Signed-off-by: NJosh Durgin <josh.durgin@inktank.com> Reviewed-by: NAlex Elder <elder@linaro.org>
Showing
想要评论请 注册 或 登录