Agreed. However, I think the easier solution is to move the
"mark_buffer_clean()" code into the early write case (search for the
comment "Hmmph! Nothing to write" ;)
> I am not sure if we can make the buffer clean outside the io_request_lock
> (looks not to be sure that the req->bh won't change under us).
We can. We have to do it _before_ rather than later, though - just in case
we race with somebody else marking it dirty (it's ok to do the IO twice,
but it's not ok to not do it at all).
> It also fixes a wrong param to async_mark_buffer_dirty.
Oops, right you are, I was going to change the rules but ended up
reverting those changes (except for this one case I missed). Thanks,
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/