summaryrefslogtreecommitdiff
path: root/mm/highmem.c
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2011-07-26 00:12:34 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 03:57:11 (GMT)
commit68da9f055755ee2609a1686722e6d6a7980019ee (patch)
tree9f2810f28a7852b0ed3390f7fa0d29979a2997c2 /mm/highmem.c
parent71f0e07a605fad1fb6b288e4dc1dd8dfa78f4872 (diff)
downloadlinux-68da9f055755ee2609a1686722e6d6a7980019ee.tar.xz
tmpfs: pass gfp to shmem_getpage_gfp
Make shmem_getpage() a wrapper, passing mapping_gfp_mask() down to shmem_getpage_gfp(), which in turn passes gfp down to shmem_swp_alloc(). Change shmem_read_mapping_page_gfp() to use shmem_getpage_gfp() in the CONFIG_SHMEM case; but leave tiny !SHMEM using read_cache_page_gfp(). Add a BUG_ON() in case anyone happens to call this on a non-shmem mapping; though we might later want to let that case route to read_cache_page_gfp(). It annoys me to have these two almost-redundant args, gfp and fault_type: I can't find a better way; but initialize fault_type only in shmem_fault(). Note that before, read_cache_page_gfp() was allocating i915_gem's pages with __GFP_NORETRY as intended; but the corresponding swap vector pages got allocated without it, leaving a small possibility of OOM. Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/highmem.c')
0 files changed, 0 insertions, 0 deletions