summaryrefslogtreecommitdiffstats
path: root/mm/page_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_io.c')
-rw-r--r--mm/page_io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/page_io.c b/mm/page_io.c
index d975fa3f02aa..2e8019d0e048 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -401,6 +401,8 @@ int swap_readpage(struct page *page, bool synchronous)
401 get_task_struct(current); 401 get_task_struct(current);
402 bio->bi_private = current; 402 bio->bi_private = current;
403 bio_set_op_attrs(bio, REQ_OP_READ, 0); 403 bio_set_op_attrs(bio, REQ_OP_READ, 0);
404 if (synchronous)
405 bio->bi_opf |= REQ_HIPRI;
404 count_vm_event(PSWPIN); 406 count_vm_event(PSWPIN);
405 bio_get(bio); 407 bio_get(bio);
406 qc = submit_bio(bio); 408 qc = submit_bio(bio);
@@ -410,7 +412,7 @@ int swap_readpage(struct page *page, bool synchronous)
410 break; 412 break;
411 413
412 if (!blk_poll(disk->queue, qc, true)) 414 if (!blk_poll(disk->queue, qc, true))
413 break; 415 io_schedule();
414 } 416 }
415 __set_current_state(TASK_RUNNING); 417 __set_current_state(TASK_RUNNING);
416 bio_put(bio); 418 bio_put(bio);