Re: CONFIG_HIGHMEM & page_address: this time in ramfs.

From: wollny (wollny@cns.mpg.de)
Date: Thu Jun 15 2000 - 15:30:33 EST


Manfred,

of course you are right, so the patch should be

--- ./linux-ac18/fs/ramfs/inode.c Tue Jun 13 22:31:21 2000
+++ ./linux-wollny/fs/ramfs/inode.c Thu Jun 15 22:27:16 2000
@@ -22,13 +22,14 @@
  * 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 */
@@ -65,7 +66,8 @@
 static int ramfs_readpage(struct file *file, struct page * page)
 {
         if (!Page_Uptodate(page)) {
- memset((void *) page_address(page), 0, PAGE_CACHE_SIZE);
+ memset((void *) kmap(page), 0, PAGE_CACHE_SIZE);
+ kunmap(page);
                 SetPageUptodate(page);
         }
         UnlockPage(page);

Best wishes

Gert

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:36 EST