bdev/rbd: put back io_channel in create_cb
In function's error processing, the io_channel should also be put back. Change-Id: Ibd3a616244a77fcc29a5ec5d1d1ca53f5412e8c6 Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3859 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
e1dc45b0fa
commit
e7a0a45e8a
@ -459,6 +459,10 @@ bdev_rbd_free_channel(struct bdev_rbd_io_channel *ch)
|
||||
if (ch->pfd >= 0) {
|
||||
close(ch->pfd);
|
||||
}
|
||||
|
||||
if (ch->group_ch) {
|
||||
spdk_put_io_channel(spdk_io_channel_from_ctx(ch->group_ch));
|
||||
}
|
||||
}
|
||||
|
||||
static void *
|
||||
@ -549,7 +553,6 @@ bdev_rbd_destroy_cb(void *io_device, void *ctx_buf)
|
||||
}
|
||||
|
||||
bdev_rbd_free_channel(io_channel);
|
||||
spdk_put_io_channel(spdk_io_channel_from_ctx(io_channel->group_ch));
|
||||
}
|
||||
|
||||
static struct spdk_io_channel *
|
||||
|
Loading…
Reference in New Issue
Block a user