Hugh Dickins d9d90e5eb7 tmpfs: add shmem_read_mapping_page_gfp
Although it is used (by i915) on nothing but tmpfs, read_cache_page_gfp()
is unsuited to tmpfs, because it inserts a page into pagecache before
calling the filesystem's ->readpage: tmpfs may have pages in swapcache
which only it knows how to locate and switch to filecache.

At present tmpfs provides a ->readpage method, and copes with this by
copying pages; but soon we can simplify it by removing its ->readpage.
Provide shmem_read_mapping_page_gfp() now, ready for that transition,

Export shmem_read_mapping_page_gfp() and add it to list in shmem_fs.h,
with shmem_read_mapping_page() inline for the common mapping_gfp case.

(shmem_read_mapping_page_gfp or shmem_read_cache_page_gfp? Generally the
read_mapping_page functions use the mapping's ->readpage, and the
read_cache_page functions use the supplied filler, so I think
read_cache_page_gfp was slightly misnamed.)

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-27 18:00:12 -07:00
..
2009-04-01 08:59:13 -07:00
2011-06-03 18:24:58 -04:00
2011-05-26 09:20:31 -07:00
2011-03-31 11:26:23 -03:00
2009-09-22 07:17:35 -07:00
2011-05-26 09:20:31 -07:00
2010-03-24 16:31:21 -07:00
2011-01-13 17:32:46 -08:00
2011-05-25 08:39:18 -07:00
2010-05-21 18:31:21 -04:00
2011-05-25 08:39:38 -07:00
2011-03-10 08:52:27 +01:00
2011-05-20 12:50:29 -07:00
2011-06-27 18:00:12 -07:00
2011-03-31 11:26:23 -03:00
2011-03-10 08:52:07 +01:00
2011-05-25 08:39:05 -07:00