block: add async version of bio_set_polled
[linux-2.6-microblaze.git] / block / fops.c
index 8594852..a2f492e 100644 (file)
@@ -358,14 +358,13 @@ static ssize_t __blkdev_direct_IO_async(struct kiocb *iocb,
                task_io_account_write(bio->bi_iter.bi_size);
        }
 
-       if (iocb->ki_flags & IOCB_NOWAIT)
-               bio->bi_opf |= REQ_NOWAIT;
-
        if (iocb->ki_flags & IOCB_HIPRI) {
-               bio_set_polled(bio, iocb);
+               bio->bi_opf |= REQ_POLLED | REQ_NOWAIT;
                submit_bio(bio);
                WRITE_ONCE(iocb->private, bio);
        } else {
+               if (iocb->ki_flags & IOCB_NOWAIT)
+                       bio->bi_opf |= REQ_NOWAIT;
                submit_bio(bio);
        }
        return -EIOCBQUEUED;