diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2011-05-10 07:54:10 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-11 13:39:01 -0700 |
commit | 149b11936159b13995d940c21ec622f756dfd66d (patch) | |
tree | 17d0cdccdc4f3152da5e80cb19afd21cad8652d0 /drivers/staging/hv/blkvsc_drv.c | |
parent | f670f824d6a740963d506d6d47a4c1a07b61c630 (diff) | |
download | op-kernel-dev-149b11936159b13995d940c21ec622f756dfd66d.zip op-kernel-dev-149b11936159b13995d940c21ec622f756dfd66d.tar.gz |
Staging: hv: Cleanup blkvsc_shutdown()
Use the newly introduced function to wait for draining I/Os to
cleanup blkvsc_shutdown().
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/blkvsc_drv.c')
-rw-r--r-- | drivers/staging/hv/blkvsc_drv.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index e6a59d7..0e16b71 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -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) |