+8
−12
Loading
Originally the code was suposed to determine if loading the blob succeeded, based on passing the cb_arg. This breaks the logic of always getting the cb_arg in cb_fn, and basing the success on bserrno. In order to fix this, cb_fn always gets the passed cb_arg. Meanwhile the cb_fn (_spdk_bs_open_blob_cpl(), now checks the bserrno to determine failure. In addition since _spdk_bs_open_blob() was the original caller allocating the blob structure, the _spdk_bs_open_blob_cpl() is now responsible for freeing it. Signed-off-by:Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ic7eb09f05e04b08dc54fc43243fd576f493cbeb2 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479141 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>