aboutsummaryrefslogtreecommitdiffstats
path: root/fs/splice.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 49fb9f129938..8d705954d294 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -74,7 +74,7 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe,
74 wait_on_page_writeback(page); 74 wait_on_page_writeback(page);
75 75
76 if (PagePrivate(page)) 76 if (PagePrivate(page))
77 try_to_release_page(page, mapping_gfp_mask(mapping)); 77 try_to_release_page(page, GFP_KERNEL);
78 78
79 /* 79 /*
80 * If we succeeded in removing the mapping, set LRU flag 80 * If we succeeded in removing the mapping, set LRU flag
@@ -333,7 +333,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
333 break; 333 break;
334 334
335 error = add_to_page_cache_lru(page, mapping, index, 335 error = add_to_page_cache_lru(page, mapping, index,
336 mapping_gfp_mask(mapping)); 336 GFP_KERNEL);
337 if (unlikely(error)) { 337 if (unlikely(error)) {
338 page_cache_release(page); 338 page_cache_release(page);
339 if (error == -EEXIST) 339 if (error == -EEXIST)
@@ -557,7 +557,6 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
557{ 557{
558 struct file *file = sd->file; 558 struct file *file = sd->file;
559 struct address_space *mapping = file->f_mapping; 559 struct address_space *mapping = file->f_mapping;
560 gfp_t gfp_mask = mapping_gfp_mask(mapping);
561 unsigned int offset, this_len; 560 unsigned int offset, this_len;
562 struct page *page; 561 struct page *page;
563 pgoff_t index; 562 pgoff_t index;
@@ -591,7 +590,7 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
591 goto find_page; 590 goto find_page;
592 591
593 page = buf->page; 592 page = buf->page;
594 if (add_to_page_cache(page, mapping, index, gfp_mask)) { 593 if (add_to_page_cache(page, mapping, index, GFP_KERNEL)) {
595 unlock_page(page); 594 unlock_page(page);
596 goto find_page; 595 goto find_page;
597 } 596 }
@@ -613,7 +612,7 @@ find_page:
613 * This will also lock the page 612 * This will also lock the page
614 */ 613 */
615 ret = add_to_page_cache_lru(page, mapping, index, 614 ret = add_to_page_cache_lru(page, mapping, index,
616 gfp_mask); 615 GFP_KERNEL);
617 if (unlikely(ret)) 616 if (unlikely(ret))
618 goto out; 617 goto out;
619 } 618 }