From: Chris Wilson Date: Wed, 22 Mar 2017 22:34:47 +0000 (+0000) Subject: drm/i915: Actually pass the reclaim gfp_t along to shmemfs! X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=40149f00fb55263cf10066bafc8470d33b1ddcfc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/i915: Actually pass the reclaim gfp_t along to shmemfs! Words cannot describe the embarrassment at creating a new gfp_t relaim to only prevent the oomkiller but allow direct|kswapd reclaim, and then not use it in the shmem_read_mapping_page_gfp(). Fixes: 24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322223447.7493-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 9d710bd8c6c9..2a32d7c120fc 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2343,7 +2343,7 @@ rebuild_st: reclaim = mapping_gfp_constraint(mapping, 0); reclaim |= __GFP_NORETRY; /* reclaim, but no oom */ - page = shmem_read_mapping_page_gfp(mapping, i, gfp); + page = shmem_read_mapping_page_gfp(mapping, i, reclaim); if (IS_ERR(page)) { ret = PTR_ERR(page); goto err_sg;