diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | linux/dev/glue/block.c | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -2,6 +2,9 @@ * kern/debug.c (panic) [MACH_KDB]: Don't wait before running the debugger. + * 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. 2007-12-11 Thomas Schwinge <tschwinge@gnu.org> 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; } |