summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2013-12-16 20:02:41 +0400
committerIlya Dryomov <ilya.dryomov@inktank.com>2013-12-31 22:32:07 +0400
commite37180c0f2f0c5b21e9295d5b19874ff4a659be1 (patch)
treeba318894322eba99e4351982938c391ece65acdc /drivers/block
parentfca270653909404112ea5f6eed274ed5272d5252 (diff)
downloadlinux-e37180c0f2f0c5b21e9295d5b19874ff4a659be1.tar.xz
rbd: tear down watch request if rbd_dev_device_setup() fails
Tear down watch request if rbd_dev_device_setup() fails. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/rbd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index d078d2352c77..72a7eec456a9 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -5143,6 +5143,12 @@ static ssize_t do_rbd_add(struct bus_type *bus,
rc = rbd_dev_device_setup(rbd_dev);
if (rc) {
+ /*
+ * rbd_dev_header_unwatch_sync() can't be moved into
+ * rbd_dev_image_release() without refactoring, see
+ * commit 1f3ef78861ac.
+ */
+ rbd_dev_header_unwatch_sync(rbd_dev);
rbd_dev_image_release(rbd_dev);
goto err_out_module;
}