tcm/pscsi: Convert struct bio->bi_rw assignment to use REQ_WRITE
Subsystems (2)
PATCH 1/1 tcm/pscsi: Convert struct bio->bi_rw assignment to use REQ_WRITE
From: Nicholas Bellinger <[email protected]>
Greetings hch and tejun,
This patch updates pscsi_map_task_SG() to use the new .36-rc REQ_WRITE macro in include/linux/blk_types.h when setting struct bio->bi_rw for WRITE I/O. This replaces the legacy (1 << BIO_RW) assignment, for which the new REQ_WRITE macro expands to:
#define REQ_WRITE (1 << __REQ_WRITE)
to match the old BIO_RW assignement.
Thanks!
Signed-off-by Nicholas A. Bellinger <[email protected]>
--- drivers/target/target_core_pscsi.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/target/target_core_pscsi.c +3 -4
@@ -30,6 +30,7 @@#include <linux/string.h> #include <linux/timer.h> #include <linux/blkdev.h> +#include <linux/blk_types.h> #include <linux/slab.h> #include <linux/spinlock.h> #include <linux/smp_lock.h>
@@ -1103,11 +1104,9 @@ static int pscsi_map_task_SG(struct se_task *task) bio =pscsi_get_bio (pdv, nr_vecs);if (!(bio)) goto fail; -/* -* FIXME: Use bio_set_dir() when avaliable -*/ +if (rw) - bio->bi_rw |= (1 <<BIO_RW ); + bio->bi_rw |=REQ_WRITE ; DEBUG_PSCSI("PSCSI: Allocated bio: %p," " dir: %s nr_vecs: %d\n", bio,
Signature · 1 line
1.5.6.5