diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 19:25:53 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 19:25:53 +0000 |
commit | 57445428488a2862840c4d7c96d7746c11031aaf (patch) | |
tree | 60b88b3a21896a33ee4dccc727d88b745a9ff731 /fs/romfs/inode.c | |
parent | 2e837819b1563679b55363d469239fdf4f17fbbb (diff) |
Merge with Linu 2.4.0-test6-pre6.
Diffstat (limited to 'fs/romfs/inode.c')
-rw-r--r-- | fs/romfs/inode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c index 47665f936..8d01f17ba 100644 --- a/fs/romfs/inode.c +++ b/fs/romfs/inode.c @@ -391,8 +391,8 @@ static int romfs_readpage(struct file *file, struct page * page) { struct inode *inode = (struct inode*)page->mapping->host; - unsigned long buf; unsigned long offset, avail, readlen; + void *buf; int result = -EIO; lock_kernel(); @@ -404,22 +404,23 @@ romfs_readpage(struct file *file, struct page * page) if (offset < inode->i_size) { avail = inode->i_size-offset; readlen = min(avail, PAGE_SIZE); - if (romfs_copyfrom(inode, (void *)buf, inode->u.romfs_i.i_dataoffset+offset, readlen) == readlen) { + if (romfs_copyfrom(inode, buf, inode->u.romfs_i.i_dataoffset+offset, readlen) == readlen) { if (readlen < PAGE_SIZE) { - memset((void *)(buf+readlen),0,PAGE_SIZE-readlen); + memset(buf + readlen,0,PAGE_SIZE-readlen); } SetPageUptodate(page); result = 0; } } if (result) { - memset((void *)buf, 0, PAGE_SIZE); + memset(buf, 0, PAGE_SIZE); SetPageError(page); } + flush_dcache_page(page); UnlockPage(page); - free_page(buf); + __free_page(page); unlock_kernel(); return result; |