+14
−11
Loading
If the specified name already exists in the global bdev name tree, RB_INSERT() returns a pointer to it. Hence we do not have to call bdev_get_by_name() when using bdev_name_add(). Hence update bdev_name_add() to return -EEXIST if RB_INSERT() returns a non-NULL pointer, and then remove the bdev_get_by_name() calls. Signed-off-by:Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I2d4554ef7e5286270417def64b638b803eecfca2 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8573 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by:
Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>