Re: Kernel bug: Bad page state: related to generic symlink code and mmap

Al Viro
2005-08-19T16:18:30Z

On Fri, Aug 19, 2005 at 09:07:35AM -0700, Linus Torvalds wrote:
> Hmm.. NFS _does_ use the page cache for symlinks, but uses it slightly
> differently: instead of relying on the page cache entry being the same
> when freeing the page, it just caches the page it looked up in the page
> cache (ie "nfs_follow_link()" does look up the page cache, but then hides
> the page pointer inside the page data itself (uglee), and thus does not
> depend on the mapping staying the same (nfs_put_link() just takes the page
> from the symlink data).

For NFS that was done exactly to deal with cache invalidation. IIRC, I've
convinced myself that it wasn't going to happen on ncpfs and happily
abstained from duplicating the NFS variant.