diff options
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index c0018f2d50e0..5f0a3c91fdac 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1828,7 +1828,7 @@ repeat: | |||
1828 | page = __page_cache_alloc(gfp | __GFP_COLD); | 1828 | page = __page_cache_alloc(gfp | __GFP_COLD); |
1829 | if (!page) | 1829 | if (!page) |
1830 | return ERR_PTR(-ENOMEM); | 1830 | return ERR_PTR(-ENOMEM); |
1831 | err = add_to_page_cache_lru(page, mapping, index, GFP_KERNEL); | 1831 | err = add_to_page_cache_lru(page, mapping, index, gfp); |
1832 | if (unlikely(err)) { | 1832 | if (unlikely(err)) { |
1833 | page_cache_release(page); | 1833 | page_cache_release(page); |
1834 | if (err == -EEXIST) | 1834 | if (err == -EEXIST) |
@@ -1925,10 +1925,7 @@ static struct page *wait_on_page_read(struct page *page) | |||
1925 | * @gfp: the page allocator flags to use if allocating | 1925 | * @gfp: the page allocator flags to use if allocating |
1926 | * | 1926 | * |
1927 | * This is the same as "read_mapping_page(mapping, index, NULL)", but with | 1927 | * This is the same as "read_mapping_page(mapping, index, NULL)", but with |
1928 | * any new page allocations done using the specified allocation flags. Note | 1928 | * any new page allocations done using the specified allocation flags. |
1929 | * that the Radix tree operations will still use GFP_KERNEL, so you can't | ||
1930 | * expect to do this atomically or anything like that - but you can pass in | ||
1931 | * other page requirements. | ||
1932 | * | 1929 | * |
1933 | * If the page does not get brought uptodate, return -EIO. | 1930 | * If the page does not get brought uptodate, return -EIO. |
1934 | */ | 1931 | */ |
@@ -2407,7 +2404,6 @@ static ssize_t generic_perform_write(struct file *file, | |||
2407 | iov_iter_count(i)); | 2404 | iov_iter_count(i)); |
2408 | 2405 | ||
2409 | again: | 2406 | again: |
2410 | |||
2411 | /* | 2407 | /* |
2412 | * Bring in the user page that we will copy from _first_. | 2408 | * Bring in the user page that we will copy from _first_. |
2413 | * Otherwise there's a nasty deadlock on copying from the | 2409 | * Otherwise there's a nasty deadlock on copying from the |
@@ -2463,7 +2459,10 @@ again: | |||
2463 | written += copied; | 2459 | written += copied; |
2464 | 2460 | ||
2465 | balance_dirty_pages_ratelimited(mapping); | 2461 | balance_dirty_pages_ratelimited(mapping); |
2466 | 2462 | if (fatal_signal_pending(current)) { | |
2463 | status = -EINTR; | ||
2464 | break; | ||
2465 | } | ||
2467 | } while (iov_iter_count(i)); | 2466 | } while (iov_iter_count(i)); |
2468 | 2467 | ||
2469 | return written ? written : status; | 2468 | return written ? written : status; |