From: Rik van Riel <riel@conectiva.com.br>
To: Andrew Morton <akpm@zip.com.au>
Cc: William Lee Irwin III <wli@holomorphy.com>, linux-mm@kvack.org
Subject: [PATCH] small rmap bugfix
Date: Thu, 11 Jul 2002 17:08:12 -0300 (BRT) [thread overview]
Message-ID: <Pine.LNX.4.44L.0207111705480.14432-100000@imladris.surriel.com> (raw)
Hi,
I just ran into a bad piece of code in the rmap patch Andrew
has been testing recently. It's possible for pages that were
truncated to still have their bufferheads _and_ be mapped in
the pagetables of processes.
In that case a piece of code in shrink_cache would remove
that page from the LRU ... in effect making it unswappable.
Since the lru_cache_del() is called from page_cache_release()
anyway we can fix the bug by dropping this obsolete piece of
code.
regards,
Rik
--
Bravely reimplemented by the knights who say "NIH".
http://www.surriel.com/ http://distro.conectiva.com/
===== mm/vmscan.c 1.81 vs edited =====
--- 1.81/mm/vmscan.c Fri Jul 5 22:31:52 2002
+++ edited/mm/vmscan.c Thu Jul 11 17:01:00 2002
@@ -235,19 +235,11 @@
if (try_to_release_page(page, gfp_mask)) {
if (!mapping) {
- /*
- * We must not allow an anon page
- * with no buffers to be visible on
- * the LRU, so we unlock the page after
- * taking the lru lock
- */
- spin_lock(&pagemap_lru_lock);
- unlock_page(page);
- __lru_cache_del(page);
-
/* effectively free the page here */
+ unlock_page(page);
page_cache_release(page);
+ spin_lock(&pagemap_lru_lock);
if (--nr_pages)
continue;
break;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
next reply other threads:[~2002-07-11 20:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-11 20:08 Rik van Riel [this message]
2002-07-11 20:18 ` Andrew Morton
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=Pine.LNX.4.44L.0207111705480.14432-100000@imladris.surriel.com \
--to=riel@conectiva.com.br \
--cc=akpm@zip.com.au \
--cc=linux-mm@kvack.org \
--cc=wli@holomorphy.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