mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: fix cleanup when trying to mount inexistent image net/ceph: make ceph_msgr_wq non-reentrant ceph: fsc->*_wq's aren't used in memory reclaim path ceph: Always free allocated memory in osdmap_decode() ceph: Makefile: Remove unnessary code ceph: associate requests with opening sessions ceph: drop redundant r_mds field ceph: implement DIRLAYOUTHASH feature to get dir layout from MDS ceph: add dir_layout to inode
This commit is contained in:
commit
a170315420
15 changed files with 116 additions and 108 deletions
|
|
@ -1790,18 +1790,29 @@ static ssize_t rbd_add(struct bus_type *bus, const char *buf, size_t count)
|
|||
|
||||
rc = rbd_bus_add_dev(rbd_dev);
|
||||
if (rc)
|
||||
goto err_out_disk;
|
||||
goto err_out_blkdev;
|
||||
|
||||
/* set up and announce blkdev mapping */
|
||||
rc = rbd_init_disk(rbd_dev);
|
||||
if (rc)
|
||||
goto err_out_blkdev;
|
||||
goto err_out_bus;
|
||||
|
||||
return count;
|
||||
|
||||
err_out_bus:
|
||||
mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
|
||||
list_del_init(&rbd_dev->node);
|
||||
mutex_unlock(&ctl_mutex);
|
||||
|
||||
/* this will also clean up rest of rbd_dev stuff */
|
||||
|
||||
rbd_bus_del_dev(rbd_dev);
|
||||
kfree(options);
|
||||
kfree(mon_dev_name);
|
||||
return rc;
|
||||
|
||||
err_out_blkdev:
|
||||
unregister_blkdev(rbd_dev->major, rbd_dev->name);
|
||||
err_out_disk:
|
||||
rbd_free_disk(rbd_dev);
|
||||
err_out_client:
|
||||
rbd_put_client(rbd_dev);
|
||||
mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
|
||||
|
|
|
|||
Loading…
Reference in a new issue