summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-11-26 16:24:43 +0100
committerJens Axboe <axboe@kernel.dk>2018-11-26 16:25:53 +0100
commit0a1b8b87d064a47fad9ec475316002da28559207 (patch)
tree9bc87a52b3fcc1f476d52ae94d6bb7e69e2bfd94 /mm
parentnvme: remove opportunistic polling from bdev target (diff)
downloadlinux-0a1b8b87d064a47fad9ec475316002da28559207.tar.xz
linux-0a1b8b87d064a47fad9ec475316002da28559207.zip
block: make blk_poll() take a parameter on whether to spin or not
blk_poll() has always kept spinning until it found an IO. This is fine for SYNC polling, since we need to find one request we have pending, but in preparation for ASYNC polling it can be beneficial to just check if we have any entries available or not. Existing callers are converted to pass in 'spin == true', to retain the old behavior. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_io.c b/mm/page_io.c
index a7271fa481f6..5bdfd21c1bd9 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -410,7 +410,7 @@ int swap_readpage(struct page *page, bool synchronous)
if (!READ_ONCE(bio->bi_private))
break;
- if (!blk_poll(disk->queue, qc))
+ if (!blk_poll(disk->queue, qc, true))
break;
}
__set_current_state(TASK_RUNNING);