Re: [patch 10/10] mm: fix pagecache write deadlocks

2007-01-13 Thread Nick Piggin
Nick Piggin wrote: @@ -1878,31 +1889,88 @@ generic_file_buffered_write(struct kiocb break; } + /* +* non-uptodate pages cannot cope with short copies, and we +* cannot take a pagefault with the destination page locked. +

[patch 10/10] mm: fix pagecache write deadlocks

2007-01-12 Thread Nick Piggin
Modify the core write() code so that it won't take a pagefault while holding a lock on the pagecache page. There are a number of different deadlocks possible if we try to do such a thing: 1. generic_buffered_write 2. lock_page 3.prepare_write 4. unlock_page+vmtruncate 5. copy_from_u