mm, fs: introduce mapping_gfp_constraint()
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / i915 / i915_gem.c
index 7e505d4be7c0718ab475f62741b5d0d6d3cc9692..399aab265db3cdd669bced4452d237ad78076b98 100644 (file)
@@ -2214,9 +2214,8 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
         * Fail silently without starting the shrinker
         */
        mapping = file_inode(obj->base.filp)->i_mapping;
-       gfp = mapping_gfp_mask(mapping);
+       gfp = mapping_gfp_constraint(mapping, ~(__GFP_IO | __GFP_RECLAIM));
        gfp |= __GFP_NORETRY | __GFP_NOWARN;
-       gfp &= ~(__GFP_IO | __GFP_RECLAIM);
        sg = st->sgl;
        st->nents = 0;
        for (i = 0; i < page_count; i++) {