From: Herbert Xu <herbert@gondor.apana.org.au>
To: Linus Torvalds <torvalds@transmeta.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] CramFS and HighMem
Date: Sun, 19 Aug 2001 07:59:07 +1000 [thread overview]
Message-ID: <20010819075907.A19307@gondor.apana.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 281 bytes --]
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
[-- Attachment #2: p --]
[-- Type: text/plain, Size: 1062 bytes --]
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);
reply other threads:[~2001-08-18 21:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010819075907.A19307@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).