direct-io: only use block polling if explicitly requested
authorChristoph Hellwig <hch@lst.de>
Thu, 3 Mar 2016 15:04:02 +0000 (16:04 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 4 Mar 2016 17:20:10 +0000 (12:20 -0500)
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>
fs/direct-io.c

index 1b2f7ffc8b841fd16cf312874fe8c7d4c0fa0e8e..85463171053b042d835e9a0632e5036ce2eb74c9 100644 (file)
@@ -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);
This page took 0.026512 seconds and 5 git commands to generate.