Hi Linus, 

block_truncate_page() function unecessarily calls mark_buffer_dirty(),
which may wait on bdflush, while holding a locked page.

The following patch against 2.4.0test13pre4 makes block_truncate_page call
balance_dirty() (which may wait for bdflush) after when we unlocked the
page and decrement its counter.

Comments?

--- linux.orig/fs/buffer.c.orig    Thu Dec 28 15:01:01 2000
+++ linux/fs/buffer.c Thu Dec 28 15:01:40 2000
@@ -1909,12 +1909,13 @@
        flush_dcache_page(page);
        kunmap(page);
 
-       mark_buffer_dirty(bh);
+       __mark_buffer_dirty(bh);
        err = 0;
 
 unlock:
        UnlockPage(page);
        page_cache_release(page);
+       balance_dirty(bh->b_dev);
 out:
        return err;
 }


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to