diff options
author | Hugh Dickins <hugh@veritas.com> | 2008-04-03 18:35:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-03 18:39:49 -0400 |
commit | 4cd13504652d28e16bf186c6bb2bbb3725369383 (patch) | |
tree | 2bc557b5a3c92954fabea3cb6217d1373bbedaa4 | |
parent | 9597362d354f8655ece324b01d0c640a0e99c077 (diff) |
splice: use mapping_gfp_mask
The loop block driver is careful to mask __GFP_IO|__GFP_FS out of its
mapping_gfp_mask, to avoid hangs under memory pressure. But nowadays
it uses splice, usually going through __generic_file_splice_read. That
must use mapping_gfp_mask instead of GFP_KERNEL to avoid those hangs.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/splice.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/splice.c b/fs/splice.c index 0670c915cd35..a861bb318ac8 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -320,7 +320,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos, | |||
320 | break; | 320 | break; |
321 | 321 | ||
322 | error = add_to_page_cache_lru(page, mapping, index, | 322 | error = add_to_page_cache_lru(page, mapping, index, |
323 | GFP_KERNEL); | 323 | mapping_gfp_mask(mapping)); |
324 | if (unlikely(error)) { | 324 | if (unlikely(error)) { |
325 | page_cache_release(page); | 325 | page_cache_release(page); |
326 | if (error == -EEXIST) | 326 | if (error == -EEXIST) |