From: "David S. Miller" <davem@redhat.com>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: set_page_dirty/page_launder deadlock
Date: Sun, 14 Jan 2001 05:27:45 -0800 (PST) [thread overview]
Message-ID: <14945.43345.483744.954137@pizda.ninka.net> (raw)
In-Reply-To: <Pine.LNX.4.21.0101140108430.11917-100000@freak.distro.conectiva>
In-Reply-To: <Pine.LNX.4.21.0101140108430.11917-100000@freak.distro.conectiva>
Marcelo Tosatti writes:
>
> While taking a look at page_launder()...
...
> set_page_dirty() may lock the pagecache_lock which means potential
> deadlock since we have the pagemap_lru_lock locked.
Indeed, the following should work as a fix:
--- mm/vmscan.c.~1~ Thu Jan 11 02:22:19 2001
+++ mm/vmscan.c Sun Jan 14 05:26:17 2001
@@ -493,12 +493,15 @@
page_cache_release(page);
/* And re-start the thing.. */
- spin_lock(&pagemap_lru_lock);
- if (result != 1)
+ if (result != 1) {
+ spin_lock(&pagemap_lru_lock);
continue;
- /* writepage refused to do anything */
- set_page_dirty(page);
- goto page_active;
+ } else {
+ /* writepage refused to do anything */
+ set_page_dirty(page);
+ spin_lock(&pagemap_lru_lock);
+ goto page_active;
+ }
}
/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-14 13:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-14 3:21 Marcelo Tosatti
2001-01-14 13:27 ` David S. Miller [this message]
2001-01-14 18:56 ` Linus Torvalds
2001-01-17 19:57 ` Chris Mason
2001-01-19 17:44 ` Christoph Rohland
2001-01-23 18:28 ` Hugh Dickins
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=14945.43345.483744.954137@pizda.ninka.net \
--to=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--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
all inboxes | Powered by JetHome®