Commit 149b1193 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: Cleanup blkvsc_shutdown()

Use the newly introduced function to wait for draining I/Os to
cleanup blkvsc_shutdown().
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarAbhishek Kane <v-abkane@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f670f824
......@@ -588,15 +588,13 @@ static void blkvsc_shutdown(struct hv_device *dev)
spin_unlock_irqrestore(&blkdev->lock, flags);
while (blkdev->num_outstanding_reqs) {
DPRINT_INFO(STORVSC, "waiting for %d requests to complete...",
blkdev->num_outstanding_reqs);
udelay(100);
}
blkvsc_do_operation(blkdev, DO_FLUSH);
/*
* Now wait for all outgoing I/O to be drained.
*/
storvsc_wait_to_drain((struct storvsc_device *)dev->ext);
}
static int blkvsc_release(struct gendisk *disk, fmode_t mode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment