scst_lib, scst_vdisk: Port to Linux kernel v6.2

bio_set_op_attrs has been removed, replace it with a direct
assignment of the flags to bio->bi_opf.

See also commit c34b7ac65087 ("block: remove bio_set_op_attrs") # v6.2.
This commit is contained in:
Gleb Chesnokov
2023-01-09 12:48:57 +03:00
parent cbc8d5ee9b
commit 590ad2f0b9
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -450,7 +450,7 @@ static int vdisk_blockio_flush(struct block_device *bdev, gfp_t gfp_mask,
* 28a8f0d317bf ("block, drivers, fs: rename REQ_FLUSH to
* REQ_PREFLUSH") # v4.8.
*/
bio_set_op_attrs(bio, REQ_OP_WRITE, REQ_PREFLUSH);
bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
submit_bio(bio);
#else
/*
@@ -2889,7 +2889,7 @@ static ssize_t blockio_read_sync(struct scst_vdisk_dev *virt_dev, void *buf,
LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
bio->bi_rw = READ_SYNC;
#else
bio_set_op_attrs(bio, REQ_OP_READ, REQ_SYNC);
bio->bi_opf = REQ_OP_READ | REQ_SYNC;
#endif
bio_set_dev(bio, bdev);
bio->bi_end_io = blockio_end_sync_io;
@@ -6027,7 +6027,7 @@ static void blockio_exec_rw(struct vdisk_cmd_params *p, bool write, bool fua)
LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
bio->bi_rw |= REQ_WRITE;
#else
bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
bio->bi_opf = REQ_OP_WRITE;
#endif
/*
* Better to fail fast w/o any local recovery
+1 -1
View File
@@ -8244,7 +8244,7 @@ static struct request *__blk_map_kern_sg(struct request_queue *q,
LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
bio->bi_rw |= REQ_WRITE;
#else
bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
bio->bi_opf = REQ_OP_WRITE;
#endif
bios++;
bio->bi_private = bw;