summaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1995-11-14 08:00:00 +0000
committer <ralf@linux-mips.org>1995-11-14 08:00:00 +0000
commite7c2a72e2680827d6a733931273a93461c0d8d1b (patch)
treec9abeda78ef7504062bb2e816bcf3e3c9d680112 /fs/block_dev.c
parentec6044459060a8c9ce7f64405c465d141898548c (diff)
Import of Linux/MIPS 1.3.0
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index d19af6fa0..9d54d03c7 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -9,12 +9,15 @@
#include <linux/kernel.h>
#include <linux/locks.h>
#include <linux/fcntl.h>
+#include <linux/mm.h>
+
#include <asm/segment.h>
#include <asm/system.h>
extern int *blk_size[];
extern int *blksize_size[];
+#define MAX_BUF_PER_PAGE (PAGE_SIZE / 512)
#define NBUF 64
int block_write(struct inode * inode, struct file * filp, char * buf, int count)
@@ -24,7 +27,7 @@ int block_write(struct inode * inode, struct file * filp, char * buf, int count)
loff_t offset;
int chars;
int written = 0;
- int cluster_list[8];
+ int cluster_list[MAX_BUF_PER_PAGE];
struct buffer_head * bhlist[NBUF];
int blocks_per_cluster;
unsigned int size;
@@ -162,7 +165,7 @@ int block_read(struct inode * inode, struct file * filp, char * buf, int count)
int blocksize_bits, i;
unsigned int blocks, rblocks, left;
int bhrequest, uptodate;
- int cluster_list[8];
+ int cluster_list[MAX_BUF_PER_PAGE];
int blocks_per_cluster;
struct buffer_head ** bhb, ** bhe;
struct buffer_head * buflist[NBUF];