summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2007-12-30 15:48:19 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:27:14 +0200
commit5684de1053f6aa9339107319445679af91770b8c (patch)
tree0ccd480a2c259426dff322c95fd6127dd935eef7 /linux
parent6c5335e7cad873e0fc44aa0e71bbf1294a6bb7ba (diff)
2007-12-30 Samuel thibault <samuel.thibault@ens-lyon.org>
* linux/dev/glue/block.c (MAX_BUF): Set to sane stack-friendly 8 instead of blindly following VM_MAP_COPY_PAGE_LIST_MAX. (rdwr_full): increment blk by cc >> bshift instead of nb.
Diffstat (limited to 'linux')
-rw-r--r--linux/dev/glue/block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c
index c06b5d2..36aac79 100644
--- a/linux/dev/glue/block.c
+++ b/linux/dev/glue/block.c
@@ -572,7 +572,7 @@ out:
}
#define BH_Bounce 16
-#define MAX_BUF VM_MAP_COPY_PAGE_LIST_MAX
+#define MAX_BUF 8
/* Perform read/write operation RW on device DEV
starting at *off to/from buffer *BUF of size *RESID.
@@ -627,7 +627,7 @@ rdwr_full (int rw, kdev_t dev, loff_t *off, char **buf, int *resid, int bshift)
bh->b_size = cc;
bhp[i] = bh;
nb += cc >> bshift;
- blk += nb;
+ blk += cc >> bshift;
if (++i == MAX_BUF)
break;
}