On Tue, 12 Jun 2001, Linus Torvalds wrote:

> And let me descibe the BUG again.

Agreed - reply was sent before I've got your mail.
 
> -             if (bh->b_page->mapping)
> +             if (!bh->b_pprev)
> 
> Problem solved the right way, logically, so that invalidate_buffers() does
> the same thing regardless of whether the mapping has been removed or not,
> instead of having pseudo-random behaviour.
> 
> No?

We need a bit more - set_blocksize() is another source of the same problem,
AFAICS. How about the following?

--- S6-pre2/fs/buffer.c Fri Jun  8 18:29:03 2001
+++ /tmp/buffer.c       Tue Jun 12 13:17:57 2001
@@ -646,8 +646,8 @@
                        /* Another device? */
                        if (bh->b_dev != dev)
                                continue;
-                       /* Part of a mapping? */
-                       if (bh->b_page->mapping)
+                       /* Not hashed? */
+                       if (!bh->b_pprev)
                                continue;
                        if (buffer_locked(bh)) {
                                atomic_inc(&bh->b_count);
@@ -710,6 +710,8 @@
                for (i = nr_buffers_type[nlist]; i > 0 ; bh = bh_next, i--) {
                        bh_next = bh->b_next_free;
                        if (bh->b_dev != dev || bh->b_size == size)
+                               continue;
+                       if (!bh->b_pprev)
                                continue;
                        if (buffer_locked(bh)) {
                                atomic_inc(&bh->b_count);

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]

Reply via email to