From: Alex Elder Date: Fri, 10 Aug 2012 20:12:07 +0000 (-0700) Subject: rbd: drop dev reference on error in rbd_open() X-Git-Tag: v3.6~28^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=340c7a2b2c9a2da640af28a8c196356484ac8b50;p=pandora-kernel.git rbd: drop dev reference on error in rbd_open() 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 Reviewed-by: Yehuda Sadeh Reviewed-by: Josh Durgin --- Reading git-diff-tree failed