Staging: hv: Use the newly introduced I/O drain synch method
authorK. Y. Srinivasan <kys@microsoft.com>
Tue, 10 May 2011 14:54:08 +0000 (07:54 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 11 May 2011 20:39:00 +0000 (13:39 -0700)
Use the newly introduced I/O drain synch method.

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>
drivers/staging/hv/storvsc.c

index 36458b87f347b9e87b0f54abcc065ced541e2e60..8e529d502c6d844fa41afe05e7f6f72a5cf64138 100644 (file)
@@ -501,11 +501,8 @@ int storvsc_dev_remove(struct hv_device *device)
         * only allow inbound traffic (responses) to proceed so that
         * outstanding requests can be completed.
         */
-       while (atomic_read(&stor_device->num_outstanding_req)) {
-               DPRINT_INFO(STORVSC, "waiting for %d requests to complete...",
-                           atomic_read(&stor_device->num_outstanding_req));
-               udelay(100);
-       }
+
+       storvsc_wait_to_drain(stor_device);
 
        DPRINT_INFO(STORVSC, "removing storage device (%p)...",
                    device->ext);