summaryrefslogtreecommitdiffstats
path: root/fs/ramfs
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-06-25 01:20:01 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-06-25 01:20:01 +0000
commit3797ba0b62debb71af4606910acacc9896a9ae3b (patch)
tree414eea76253c7871bfdf3bd9d1817771eb40917c /fs/ramfs
parent2b6c0c580795a4404f72d2a794214dd9e080709d (diff)
Merge with Linux 2.4.0-test2.
Diffstat (limited to 'fs/ramfs')
-rw-r--r--fs/ramfs/inode.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
index 2a1a7423d..f87d30e0b 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -22,14 +22,13 @@
* caches is sufficient.
*/
-
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/pagemap.h>
#include <linux/init.h>
#include <linux/string.h>
#include <linux/locks.h>
-#include <linux/highmem.h>
+
#include <asm/uaccess.h>
/* some random number */
@@ -66,8 +65,7 @@ static struct dentry * ramfs_lookup(struct inode *dir, struct dentry *dentry)
static int ramfs_readpage(struct file *file, struct page * page)
{
if (!Page_Uptodate(page)) {
- memset((void *) kmap(page), 0, PAGE_CACHE_SIZE);
- kunmap(page);
+ memset((void *) page_address(page), 0, PAGE_CACHE_SIZE);
SetPageUptodate(page);
}
UnlockPage(page);
@@ -88,6 +86,7 @@ static int ramfs_prepare_write(struct file *file, struct page *page, unsigned of
{
void *addr;
+ addr = (void *) kmap(page);
if (!Page_Uptodate(page)) {
memset(addr, 0, PAGE_CACHE_SIZE);
SetPageUptodate(page);