summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorHank Janssen2010-08-05 21:29:44 +0200
committerGreg Kroah-Hartman2010-09-04 02:37:15 +0200
commit0c47a70a9a8a6d1ec37a53d2f9cb82f8b8ef8aa2 (patch)
tree651447d7bfd8dfcb56af861f456b9a97e5405fab /drivers/staging
parentstaging: hv: Fix missing functions for net_device_ops (diff)
downloadkernel-qcow2-linux-0c47a70a9a8a6d1ec37a53d2f9cb82f8b8ef8aa2.tar.gz
kernel-qcow2-linux-0c47a70a9a8a6d1ec37a53d2f9cb82f8b8ef8aa2.tar.xz
kernel-qcow2-linux-0c47a70a9a8a6d1ec37a53d2f9cb82f8b8ef8aa2.zip
staging: hv: Fixed bounce kmap problem by using correct index
Fixed bounce offset kmap problem by using correct index. The symptom of the problem is that in some NAS appliances this problem represents Itself by a unresponsive VM under a load with many clients writing small files. Signed-off-by:Hank Janssen <hjanssen@microsoft.com> Signed-off-by:Haiyang Zhang <haiyangz@microsoft.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/hv/storvsc_drv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 075b61bd492f..3b9ccb062008 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -495,7 +495,7 @@ static unsigned int copy_to_bounce_buffer(struct scatterlist *orig_sgl,
/* ASSERT(orig_sgl[i].offset + orig_sgl[i].length <= PAGE_SIZE); */
- if (j == 0)
+ if (bounce_addr == 0)
bounce_addr = (unsigned long)kmap_atomic(sg_page((&bounce_sgl[j])), KM_IRQ0);
while (srclen) {
@@ -556,7 +556,7 @@ static unsigned int copy_from_bounce_buffer(struct scatterlist *orig_sgl,
destlen = orig_sgl[i].length;
/* ASSERT(orig_sgl[i].offset + orig_sgl[i].length <= PAGE_SIZE); */
- if (j == 0)
+ if (bounce_addr == 0)
bounce_addr = (unsigned long)kmap_atomic(sg_page((&bounce_sgl[j])), KM_IRQ0);
while (destlen) {