lkml.org 
[lkml]   [2000]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: innd mmap bug in 2.4.0-test12
On Thu, 28 Dec 2000, Rik van Riel wrote:
> On Wed, 27 Dec 2000, Linus Torvalds wrote:
> > On Wed, 27 Dec 2000, Rik van Riel wrote:
> > >
> > > The (trivial) patch below should fix this problem.
> >
> > It must be wrong.
> >
> > If we have a dirty page on the LRU lists, that page _must_ have
> > a mapping.
>
> Hmm, last I looked buffercache pages didn't have
> page->mapping set ...

OK, you're right ;)

We never set PG_dirty for buffercache pages, so a
pure buffercache page shouldn't be caught here...

I've made a small debugging patch that simply checks
for this illegal state in add_page_to_active_list and
add_page_to_inactive_dirty_list.

regards,

Rik
--
Hollywood goes for world dumbination,
Trailer at 11.

http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com.br/


--- include/linux/swap.h.orig Thu Dec 28 12:29:29 2000
+++ include/linux/swap.h Thu Dec 28 12:31:29 2000
@@ -206,7 +206,11 @@
#define ZERO_PAGE_BUG \
if (page_count(page) == 0) BUG();

+#define DIRTY_NO_MAPPING \
+ if (PageDirty(page) && !page->mapping) BUG();
+
#define add_page_to_active_list(page) { \
+ DIRTY_NO_MAPPING \
DEBUG_ADD_PAGE \
ZERO_PAGE_BUG \
SetPageActive(page); \
@@ -215,6 +219,7 @@
}

#define add_page_to_inactive_dirty_list(page) { \
+ DIRTY_NO_MAPPING \
DEBUG_ADD_PAGE \
ZERO_PAGE_BUG \
SetPageInactiveDirty(page); \
-
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/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.121 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site