On Tue, 12 Jun 2001, Alexander Viro wrote:
>
> invalidate_buffers() will happily take such buffer_head from LRU lists
> and put it on free list. With ->b_data still pointing to the highmem
> page.
Hey, that's easy to fix.
We have a real bug, and the real bug is that we have them on the dirty
list, and we already have this
/* Part of a mapping? */
if (bh->b_page->mapping)
continue;
special case. It's just that the test is wrong. It should probably be
something like
/* Not hashed? */
if (list_empty(bh->b_hash)
continue;
instead (yeah, yeah, I know the buffer heads don't use the list
structures, I wish it did. The real way to check for the bh being hashed
to check "bh->b_pprev" for NULL, but I wish it wasn't).
Don't blame the VM layer, I think page_launder() and friends do the right
thing. It's the act of invalidation that just isn't supposed to look at
non-hashed buffers.
(That makes a lot more sense than the current test anyway: if the buffer
isn't hashed, then it isn't reachable by "dev", so it clearly also
shouldn't be invalidated by "dev").
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]