Commit e37180c0 authored by Ilya Dryomov's avatar Ilya Dryomov

rbd: tear down watch request if rbd_dev_device_setup() fails

Tear down watch request if rbd_dev_device_setup() fails.
Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
parent fca27065
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment