diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2017-04-13 12:17:38 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-05-04 09:19:23 +0200 |
commit | 5769ed0cb12dcd135251e546863196cec0b58e34 (patch) | |
tree | cb030108daaddd6f624152df7e99fd6c20a33385 /.mailmap | |
parent | fd22aef8b47cfc068448df65c1183698b0abd815 (diff) | |
download | linux-5769ed0cb12dcd135251e546863196cec0b58e34.tar.bz2 |
rbd: fix error handling around rbd_init_disk()
add_disk() takes an extra reference on disk->queue, which is put in
put_disk() -> disk_release(). Avoiding blk_cleanup_queue() (which also
puts the queue) until add_disk() sets GENHD_FL_UP works for the queue
itself, but leaks various queue internals. Conditioning tag_set freeing
on GENHD_FL_UP is wrong too: all error paths after rbd_init_disk() leak
the tag_set.
Move the final "announce" steps out of rbd_dev_device_setup() so that
it can be unwound like any other function. Leave "announce" steps to
do_rbd_add/remove().
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions