Messages in this thread Patch in this message | | | Date | Thu, 28 Dec 2000 13:18:43 -0200 (BRST) | From | Marcelo Tosatti <> | Subject | [PATCH] not sleep while holding a locked page in block_truncate_page |
| |
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 majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |