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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, 19 Aug 2005, Linus Torvalds wrote:
> 
>  - document this as a fundamental fact, and apply the ncpfs patch. Local 
>    filesystems can still continue to use the generic helper functions 
>    (all other users _are_ local filesystems).

Actually, looking at the ncpfs patch, I'd rather not apply that patch 
as-is. It looks like it will totally disable symlink caching, which would 
be kind of sad. Somebody willing to do the same thing NFS does?

NFS hides away the "struct page *" pointer at the end of the page data, so
that when we pass the pointer to the virtual address around, we can 
trivially look up the "struct page".

An alternative is to make the symlink address-space use a gfp_mask of 
GFP_KERNEL (no highmem), at which point ncpfs_put_link() just becomes 
something like

	void ncpfs_put_link(struct dentry *dentry, struct nameidata *nd)
	{
		char *addr = nd_get_link(nd);

		if (!IS_ERR(addr))
			page_cache_release(virt_to_page(addr));
	}

which is pretty ugly, but even simpler than the NFS trick.

Anybody?

			Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux