From: Ilya Dryomov Date: Mon, 16 Dec 2013 16:02:41 +0000 (+0200) Subject: rbd: tear down watch request if rbd_dev_device_setup() fails X-Git-Tag: upstream/snapshot3+hdmi~3549^2~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e37180c0f2f0c5b21e9295d5b19874ff4a659be1;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Reviewed-by: Josh Durgin --- diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index d078d23..72a7eec 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; }