Re: Test12 ll_rw_block error.

From: Linus Torvalds (torvalds@transmeta.com)
Date: Thu Dec 14 2000 - 22:28:04 EST


On Thu, 14 Dec 2000, Russell Cattelan wrote:
>
> So one more observation in
> filemap_sync_pte
>
> lock_page(page);
> error = filemap_write_page(page, 1);
> -> UnlockPage(page);
> This unlock page was removed? is that correct?

Yes. The "writepage" thing changed: "struct file" disappeared (as I'm sure
you also noticed), and the page writer is supposed to unlock the page
itself. Which it may do at any time, of course.

There are some reasons to do it only after the IO has actually completed:
this way the VM layer won't try to write it out _again_ before the first
IO hasn't even finished yet, and the writing logic can possibly be
simplified if you know that nobody else will be touching that page.

But that is up to you: you can do the UnlockPage before even returning
from your "->writepage()" function, if you choose to do so.

                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 : Fri Dec 15 2000 - 21:00:31 EST