bdev: fix error path for allocating qos paramters
Every exit path in spdk_bdev_set_qos_rate_limits() should go through _spdk_bdev_set_qos_limit_done() as soon as ctx is allocated and qos_mod_in_progress set to true. This patch fixes one path were it did not occur. With this change qos_mod_in_progress is set to false, when failure in allocating qos parameters occurs. Change-Id: I04a45dfdcde9160fd2701b44f5fde26fb0245177 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465659 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
3dad8b1568
commit
cfc0fbf11e
@ -4799,8 +4799,7 @@ spdk_bdev_set_qos_rate_limits(struct spdk_bdev *bdev, uint64_t *limits,
|
||||
if (!bdev->internal.qos) {
|
||||
pthread_mutex_unlock(&bdev->internal.mutex);
|
||||
SPDK_ERRLOG("Unable to allocate memory for QoS tracking\n");
|
||||
free(ctx);
|
||||
cb_fn(cb_arg, -ENOMEM);
|
||||
_spdk_bdev_set_qos_limit_done(ctx, -ENOMEM);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user