diff options
author | Christoph Hellwig <hch@lst.de> | 2016-03-03 16:04:02 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-03-04 12:20:10 -0500 |
commit | c43c83a294e8dc25072ca9e6fca4cdbc5564f3d4 (patch) | |
tree | 2d44bfc5c5cbae4db6c24c64f1bdc91761c37f1f /fs/direct-io.c | |
parent | 97be7ebe53915af504fb491fb99f064c7cf3cb09 (diff) | |
download | linux-c43c83a294e8dc25072ca9e6fca4cdbc5564f3d4.tar.bz2 |
direct-io: only use block polling if explicitly requested
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Stephen Bates <stephen.bates@pmcs.com>
Tested-by: Stephen Bates <stephen.bates@pmcs.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/direct-io.c')
-rw-r--r-- | fs/direct-io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index 1b2f7ffc8b84..85463171053b 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -445,7 +445,8 @@ static struct bio *dio_await_one(struct dio *dio) __set_current_state(TASK_UNINTERRUPTIBLE); dio->waiter = current; spin_unlock_irqrestore(&dio->bio_lock, flags); - if (!blk_poll(bdev_get_queue(dio->bio_bdev), dio->bio_cookie)) + if (!(dio->iocb->ki_flags & IOCB_HIPRI) || + !blk_poll(bdev_get_queue(dio->bio_bdev), dio->bio_cookie)) io_schedule(); /* wake up sets us TASK_RUNNING */ spin_lock_irqsave(&dio->bio_lock, flags); |