Commit 0ae0b5d0557264bad65e22f1e2da4b83a02c4535

Authored by Nick Piggin
Committed by Jens Axboe
1 parent d02a2c077f

fs/splice.c: fix mapping_gfp_mask usage

mapping_gfp_mask() is not supposed to store allocation contex details,
only page location details.  So mapping_gfp_mask should be applied to the
pagecache page allocation, wheras normal (kernel mapped) memory should be
used for surrounding allocations such as radix-tree nodes allocated by
add_to_page_cache.  Context modifiers should be applied on a per-callsite
basis.

So change splice to follow this convention (which is followed in similar
code patterns in core code).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -354,7 +354,7 @@
354 354 break;
355 355  
356 356 error = add_to_page_cache_lru(page, mapping, index,
357   - mapping_gfp_mask(mapping));
  357 + GFP_KERNEL);
358 358 if (unlikely(error)) {
359 359 page_cache_release(page);
360 360 if (error == -EEXIST)