xfs
[Top] [All Lists]

[Bug 182] Hitting the BUG() in filemap.c:843 (in unlock_page())

To: xfs-master@xxxxxxxxxxx
Subject: [Bug 182] Hitting the BUG() in filemap.c:843 (in unlock_page())
From: bugzilla-daemon@xxxxxxxxxxx
Date: Mon, 4 Nov 2002 14:32:51 -0800
Sender: linux-xfs-bounce@xxxxxxxxxxx
http://oss.sgi.com/bugzilla/show_bug.cgi?id=182





------- Additional Comments From sandeen@xxxxxxx  2002-11-04 14:32 -------
For the record, I believe this was the patch that fixed this problem.
(from ASANO Masahiro <masano@xxxxxxxxxxxxxx>)


I found a bug at current 2.4 CVS about `struct pagesync_t'.
Some driver top-half may call buffer_head.b_end_io() on process
context (not interrupt context). So _end_pagebuf_page_io_multi() may
be called several times with remain==1.

Please fix it. Here is a patch.
--
Masano

--- linux/fs/xfs/pagebuf/page_buf.c     Fri Oct 25 07:46:20 2002
+++ linux/fs/xfs/pagebuf/page_buf.c.new Sun Oct 27 15:53:38 2002
@@ -1645,7 +1645,7 @@
                                BUG();  /* Ugh - out of memory condition here */
                        psync->pb = pb;
                        psync->locking = locking;
-                       atomic_set(&psync->remain, 0);
+                       atomic_set(&psync->remain, cnt);
 
                        callback = public_bh ?
                                   _end_io_multi_part : _end_io_multi_full;
@@ -1667,7 +1667,6 @@
                        /* Complete the buffer_head, then submit the IO */
                        if (psync) {
                                init_buffer(bh, callback, psync);
-                               atomic_inc(&psync->remain);
                        } else {
                                init_buffer(bh, callback, pb);
                        }



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


<Prev in Thread] Current Thread [Next in Thread>