diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-11-16 08:37:34 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-19 08:34:49 -0700 |
commit | 849a370016a5489c49253338507ee6cc4a08df4b (patch) | |
tree | 3e8794bb4312b0fa73e3092849b8b6e163437a2d /fs/iomap.c | |
parent | a4668d9ba4be1ca9f4a39798ba3419fdfef0750d (diff) | |
download | linux-849a370016a5489c49253338507ee6cc4a08df4b.tar.bz2 |
block: avoid ordered task state change for polled IO
For the core poll helper, the task state setting don't need to imply any
atomics, as it's the current task itself that is being modified and
we're not going to sleep.
For IRQ driven, the wakeup path have the necessary barriers to not need
us using the heavy handed version of the task state setting.
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/iomap.c b/fs/iomap.c index b0462b363bad..c5df035ace6f 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -1888,7 +1888,8 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, return -EIOCBQUEUED; for (;;) { - set_current_state(TASK_UNINTERRUPTIBLE); + __set_current_state(TASK_UNINTERRUPTIBLE); + if (!READ_ONCE(dio->submit.waiter)) break; |