Re: [PATCH] not sleep while holding a locked page in block_truncate_page

From: Linus Torvalds (torvalds@transmeta.com)
Date: Thu Dec 28 2000 - 13:01:09 EST


On Thu, 28 Dec 2000, Marcelo Tosatti wrote:
>
> Hi Linus,
>
> block_truncate_page() function unecessarily calls mark_buffer_dirty(),
> which may wait on bdflush, while holding a locked page.

Good catch. It should be ok to sleep for bdflush while holding the page,
but at the same time it's certainly preferable _not_ to do that.

bdflush should not need any locks that we hold, so it shouldn't have
deadlocked. How did you find this? Just reading the source, or have you
seen any real problems? If the latter, maybe there's something that tries
to get a FS lock when it shouldn't?

                Linus

-
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/



This archive was generated by hypermail 2b29 : Sun Dec 31 2000 - 21:00:11 EST