fs: blkdev set bio prio from kiocb prio
authorAdam Manzanares <adam.manzanares@wdc.com>
Tue, 22 May 2018 17:52:20 +0000 (10:52 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 31 May 2018 14:50:55 +0000 (10:50 -0400)
Now that kiocb has an ioprio field copy this over to the bio when it is
created from the kiocb.

Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/block_dev.c

index 7ec920e2706566956759fa27514396a7bfb4afd7..11ba99e79d2a21084ed8f96dda1d4bfcaa9a7213 100644 (file)
@@ -216,6 +216,7 @@ __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter,
        bio.bi_write_hint = iocb->ki_hint;
        bio.bi_private = current;
        bio.bi_end_io = blkdev_bio_end_io_simple;
+       bio.bi_ioprio = iocb->ki_ioprio;
 
        ret = bio_iov_iter_get_pages(&bio, iter);
        if (unlikely(ret))
@@ -355,6 +356,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages)
                bio->bi_write_hint = iocb->ki_hint;
                bio->bi_private = dio;
                bio->bi_end_io = blkdev_bio_end_io;
+               bio->bi_ioprio = iocb->ki_ioprio;
 
                ret = bio_iov_iter_get_pages(bio, iter);
                if (unlikely(ret)) {