Re: PATCH: Bug in invalidate_inode_pages()?

Linus Torvalds
2000-05-08T23:51:44Z

On 9 May 2000, Juan J. Quintela wrote:
> I think that I have found a bug in invalidate_inode_pages.
> It results that we don't remove the pages from the
> &inode->i_mapping->pages list, then when we return te do the next loop
> through all the pages, we can try to free a page that we have freed in
> the previous pass.

This is what "remove_inode_page()" does. Maybe that's not quite clear
enough, so this function may certainly need some comments or something
like that, but your patch is wrong (it will now delete the thing twice,
which can and will result in list corruption).

> Once here I have also removed the goto

Because we dropped the page cache lock, we really have to repeat, because
the lists are now no longer protected..

Linus