diff options
Diffstat (limited to 'mm/page_io.c')
| -rw-r--r-- | mm/page_io.c | 14 | 
1 files changed, 5 insertions, 9 deletions
| diff --git a/mm/page_io.c b/mm/page_io.c index c493ce9ebcf5..9725c7e1eeea 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -38,7 +38,7 @@ void end_swap_bio_write(struct bio *bio)  		 * Also print a dire warning that things will go BAD (tm)  		 * very quickly.  		 * -		 * Also clear PG_reclaim to avoid rotate_reclaimable_page() +		 * Also clear PG_reclaim to avoid folio_rotate_reclaimable()  		 */  		set_page_dirty(page);  		pr_alert_ratelimited("Write-error on swap-device (%u:%u:%llu)\n", @@ -317,7 +317,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,  			 * temporary failure if the system has limited  			 * memory for allocating transmit buffers.  			 * Mark the page dirty and avoid -			 * rotate_reclaimable_page but rate-limit the +			 * folio_rotate_reclaimable but rate-limit the  			 * messages but do not flag PageError like  			 * the normal direct-to-bio case as it could  			 * be temporary. @@ -358,8 +358,6 @@ int swap_readpage(struct page *page, bool synchronous)  	struct bio *bio;  	int ret = 0;  	struct swap_info_struct *sis = page_swap_info(page); -	blk_qc_t qc; -	struct gendisk *disk;  	unsigned long pflags;  	VM_BUG_ON_PAGE(!PageSwapCache(page) && !synchronous, page); @@ -409,26 +407,24 @@ int swap_readpage(struct page *page, bool synchronous)  	bio->bi_iter.bi_sector = swap_page_sector(page);  	bio->bi_end_io = end_swap_bio_read;  	bio_add_page(bio, page, thp_size(page), 0); - -	disk = bio->bi_bdev->bd_disk;  	/*  	 * Keep this task valid during swap readpage because the oom killer may  	 * attempt to access it in the page fault retry time check.  	 */  	if (synchronous) { -		bio->bi_opf |= REQ_HIPRI; +		bio->bi_opf |= REQ_POLLED;  		get_task_struct(current);  		bio->bi_private = current;  	}  	count_vm_event(PSWPIN);  	bio_get(bio); -	qc = submit_bio(bio); +	submit_bio(bio);  	while (synchronous) {  		set_current_state(TASK_UNINTERRUPTIBLE);  		if (!READ_ONCE(bio->bi_private))  			break; -		if (!blk_poll(disk->queue, qc, true)) +		if (!bio_poll(bio, NULL, 0))  			blk_io_schedule();  	}  	__set_current_state(TASK_RUNNING); |