In fact, it already does for NFS, which uses PageLocked for exactly that
reason (to serialize read and write requests to the same page).
> However,
>if a given filesystem provides its own write-page strategy functions
>which have their own locking semantics, there's no real reason to
>prevent it from doing so as long as the page mapping functions continue
>to block on a non-uptodate page.
For "valid to read", you only check Uptodate. For any actual IO
(whether it's because you're going to actually _do_ the read or set up
some write), PageLocked should be used to synchronize. NFS already does
this, and generic_file_read() already understands about it.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/