-
Alex Elder authored
If a read-only rbd device is opened for writing in rbd_open(), it returns without dropping the just-acquired device reference. Fix this by moving the read-only check before getting the reference. Signed-off-by:
Alex Elder <elder@inktank.com> Reviewed-by:
Yehuda Sadeh <yehuda@inktank.com> Reviewed-by:
Josh Durgin <josh.durgin@inktank.com> (cherry picked from commit 340c7a2b) Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
a871375b