summaryrefslogtreecommitdiffstats
path: root/mm/page_io.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-15 22:42:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-15 22:42:40 -0500
commit7c225c69f86c934e3be9be63ecde754e286838d7 (patch)
treeff2df419b0c4886b37407235f7d21215e4cf45e4 /mm/page_io.c
parent6363b3f3ac5be096d08c8c504128befa0c033529 (diff)
parent1b7176aea0a924ac59c6a283129d3e8eb00aa915 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge updates from Andrew Morton: - a few misc bits - ocfs2 updates - almost all of MM * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (131 commits) memory hotplug: fix comments when adding section mm: make alloc_node_mem_map a void call if we don't have CONFIG_FLAT_NODE_MEM_MAP mm: simplify nodemask printing mm,oom_reaper: remove pointless kthread_run() error check mm/page_ext.c: check if page_ext is not prepared writeback: remove unused function parameter mm: do not rely on preempt_count in print_vma_addr mm, sparse: do not swamp log with huge vmemmap allocation failures mm/hmm: remove redundant variable align_end mm/list_lru.c: mark expected switch fall-through mm/shmem.c: mark expected switch fall-through mm/page_alloc.c: broken deferred calculation mm: don't warn about allocations which stall for too long fs: fuse: account fuse_inode slab memory as reclaimable mm, page_alloc: fix potential false positive in __zone_watermark_ok mm: mlock: remove lru_add_drain_all() mm, sysctl: make NUMA stats configurable shmem: convert shmem_init_inodecache() to void Unify migrate_pages and move_pages access checks mm, pagevec: rename pagevec drained field ...
Diffstat (limited to 'mm/page_io.c')
-rw-r--r--mm/page_io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/page_io.c b/mm/page_io.c
index cd52b9cc169b..e93f1a4cacd7 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -347,7 +347,7 @@ out:
347 return ret; 347 return ret;
348} 348}
349 349
350int swap_readpage(struct page *page, bool do_poll) 350int swap_readpage(struct page *page, bool synchronous)
351{ 351{
352 struct bio *bio; 352 struct bio *bio;
353 int ret = 0; 353 int ret = 0;
@@ -355,7 +355,7 @@ int swap_readpage(struct page *page, bool do_poll)
355 blk_qc_t qc; 355 blk_qc_t qc;
356 struct gendisk *disk; 356 struct gendisk *disk;
357 357
358 VM_BUG_ON_PAGE(!PageSwapCache(page), page); 358 VM_BUG_ON_PAGE(!PageSwapCache(page) && !synchronous, page);
359 VM_BUG_ON_PAGE(!PageLocked(page), page); 359 VM_BUG_ON_PAGE(!PageLocked(page), page);
360 VM_BUG_ON_PAGE(PageUptodate(page), page); 360 VM_BUG_ON_PAGE(PageUptodate(page), page);
361 if (frontswap_load(page) == 0) { 361 if (frontswap_load(page) == 0) {
@@ -403,7 +403,7 @@ int swap_readpage(struct page *page, bool do_poll)
403 count_vm_event(PSWPIN); 403 count_vm_event(PSWPIN);
404 bio_get(bio); 404 bio_get(bio);
405 qc = submit_bio(bio); 405 qc = submit_bio(bio);
406 while (do_poll) { 406 while (synchronous) {
407 set_current_state(TASK_UNINTERRUPTIBLE); 407 set_current_state(TASK_UNINTERRUPTIBLE);
408 if (!READ_ONCE(bio->bi_private)) 408 if (!READ_ONCE(bio->bi_private))
409 break; 409 break;