diff options
author | Jan Kara <jack@suse.cz> | 2019-11-06 10:52:10 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2019-11-06 10:52:10 +0100 |
commit | dae82c7fd0926840c832151f3258ba751f73d348 (patch) | |
tree | 5cdef8359f6cfb964919ffb0bfa36d2de60140b1 /mm/page_alloc.c | |
parent | reiserfs: replace open-coded atomic_dec_and_mutex_lock() (diff) | |
parent | quota: Handle quotas without quota inodes in dquot_get_state() (diff) | |
download | linux-dae82c7fd0926840c832151f3258ba751f73d348.tar.xz linux-dae82c7fd0926840c832151f3258ba751f73d348.zip |
Pull series refactoring quota enabling and disabling code.
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 15c2050c629b..ecc3dbad606b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1175,11 +1175,17 @@ static __always_inline bool free_pages_prepare(struct page *page, debug_check_no_obj_freed(page_address(page), PAGE_SIZE << order); } - arch_free_page(page, order); if (want_init_on_free()) kernel_init_free_pages(page, 1 << order); kernel_poison_pages(page, 1 << order, 0); + /* + * arch_free_page() can make the page's contents inaccessible. s390 + * does this. So nothing which can access the page's contents should + * happen after this. + */ + arch_free_page(page, order); + if (debug_pagealloc_enabled()) kernel_map_pages(page, 1 << order, 0); @@ -4467,12 +4473,14 @@ retry_cpuset: if (page) goto got_pg; - if (order >= pageblock_order && (gfp_mask & __GFP_IO)) { + if (order >= pageblock_order && (gfp_mask & __GFP_IO) && + !(gfp_mask & __GFP_RETRY_MAYFAIL)) { /* * If allocating entire pageblock(s) and compaction * failed because all zones are below low watermarks * or is prohibited because it recently failed at this - * order, fail immediately. + * order, fail immediately unless the allocator has + * requested compaction and reclaim retry. * * Reclaim is * - potentially very expensive because zones are far |