summaryrefslogtreecommitdiff
path: root/fs/iomap.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-11-14 07:16:54 +0300
committerJens Axboe <axboe@kernel.dk>2018-11-16 18:34:30 +0300
commit0619317ff8baa2da9238191ad5167ed3618c16d9 (patch)
treebabd22e62aad323bd61539be388620b48a0d1f7c /fs/iomap.c
parente504545446e4be916b170f159b6495c352a2b5a5 (diff)
downloadlinux-0619317ff8baa2da9238191ad5167ed3618c16d9.tar.xz
block: add polled wakeup task helper
If we're polling for IO on a device that doesn't use interrupts, then IO completion loop (and wake of task) is done by submitting task itself. If that is the case, then we don't need to enter the wake_up_process() function, we can simply mark ourselves as TASK_RUNNING. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/iomap.c')
-rw-r--r--fs/iomap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/iomap.c b/fs/iomap.c
index f61d13dfdf09..b0462b363bad 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -1525,7 +1525,7 @@ static void iomap_dio_bio_end_io(struct bio *bio)
if (dio->wait_for_completion) {
struct task_struct *waiter = dio->submit.waiter;
WRITE_ONCE(dio->submit.waiter, NULL);
- wake_up_process(waiter);
+ blk_wake_io_task(waiter);
} else if (dio->flags & IOMAP_DIO_WRITE) {
struct inode *inode = file_inode(dio->iocb->ki_filp);