diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index bebdf0a94b7c..e7496f0b29d4 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -2551,12 +2551,13 @@ static void ublk_ch_release_work_fn(struct work_struct *work) } /* - * disk isn't attached yet, either device isn't live, or it has - * been removed already, so we needn't to do anything + * No disk: the device isn't live, or it has been removed already. + * There are no requests to abort, but the round still has to be + * reset, so that a new server can fetch and start the device. */ disk = ublk_get_disk(ub); if (!disk) - goto out; + goto reset; /* * All uring_cmd are done now, so abort any request outstanding to @@ -2617,10 +2618,9 @@ static void ublk_ch_release_work_fn(struct work_struct *work) unlock: mutex_unlock(&ub->mutex); ublk_put_disk(disk); - +reset: /* all uring_cmd has been done now, reset device & ubq */ ublk_reset_ch_dev(ub); -out: clear_bit(UB_STATE_OPEN, &ub->state); /* put the reference grabbed in ublk_ch_release() */