mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Reviewed-by: Josh Durgin <[email protected]>
This commit is contained in:
parent
fca2706539
commit
e37180c0f2
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue