lkml.org 
[lkml]   [2001]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] CramFS and HighMem
From
This patch replaces page_address in fs/cramfs with kmap.
--
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
diff -u -r1.1.1.6 -r1.6
--- fs/cramfs/inode.c 19 Jul 2001 23:14:53 -0000 1.1.1.6
+++ fs/cramfs/inode.c 18 Aug 2001 08:11:14 -0000 1.6
@@ -374,6 +374,7 @@
{
struct inode *inode = page->mapping->host;
u32 maxblock, bytes_filled;
+ void *pgdata;

maxblock = (inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
bytes_filled = 0;
@@ -387,15 +388,18 @@
start_offset = *(u32 *) cramfs_read(sb, blkptr_offset-4, 4);
compr_len = (*(u32 *) cramfs_read(sb, blkptr_offset, 4)
- start_offset);
+ pgdata = kmap(page);
if (compr_len == 0)
; /* hole */
else
- bytes_filled = cramfs_uncompress_block(page_address(page),
+ bytes_filled = cramfs_uncompress_block(pgdata,
PAGE_CACHE_SIZE,
cramfs_read(sb, start_offset, compr_len),
compr_len);
- }
- memset(page_address(page) + bytes_filled, 0, PAGE_CACHE_SIZE - bytes_filled);
+ } else
+ pgdata = kmap(page);
+ memset(pgdata + bytes_filled, 0, PAGE_CACHE_SIZE - bytes_filled);
+ kunmap(page);
flush_dcache_page(page);
SetPageUptodate(page);
UnlockPage(page);
\
 
 \ /
  Last update: 2005-03-22 12:57    [W:1.664 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site