summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-05-09 03:54:05 -0400
committerJens Axboe <axboe@kernel.dk>2018-05-14 10:55:12 -0400
commitff005a066240efb73ae29a2bb9269ae726bc2eae (patch)
tree95cc3d40c1484013d466e08c288d283fae8644f2 /drivers
parenta9a14d36714fe3669ad5a26faaca0cfaafb1c0f9 (diff)
block: sanitize blk_get_request calling conventions
Switch everyone to blk_get_request_flags, and then rename blk_get_request_flags to blk_get_request. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/paride/pd.c2
-rw-r--r--drivers/block/pktcdvd.c2
-rw-r--r--drivers/block/sx8.c2
-rw-r--r--drivers/block/virtio_blk.c2
-rw-r--r--drivers/cdrom/cdrom.c2
-rw-r--r--drivers/ide/ide-atapi.c2
-rw-r--r--drivers/ide/ide-cd.c2
-rw-r--r--drivers/ide/ide-cd_ioctl.c2
-rw-r--r--drivers/ide/ide-devsets.c2
-rw-r--r--drivers/ide/ide-disk.c2
-rw-r--r--drivers/ide/ide-ioctls.c4
-rw-r--r--drivers/ide/ide-park.c4
-rw-r--r--drivers/ide/ide-pm.c5
-rw-r--r--drivers/ide/ide-tape.c2
-rw-r--r--drivers/ide/ide-taskfile.c2
-rw-r--r--drivers/md/dm-mpath.c3
-rw-r--r--drivers/mmc/core/block.c12
-rw-r--r--drivers/scsi/osd/osd_initiator.c2
-rw-r--r--drivers/scsi/osst.c2
-rw-r--r--drivers/scsi/scsi_error.c2
-rw-r--r--drivers/scsi/scsi_lib.c2
-rw-r--r--drivers/scsi/sg.c2
-rw-r--r--drivers/scsi/st.c2
-rw-r--r--drivers/target/target_core_pscsi.c3
24 files changed, 32 insertions, 35 deletions
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index 27a44b97393a..8961b190e256 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -740,7 +740,7 @@ static int pd_special_command(struct pd_unit *disk,
740{ 740{
741 struct request *rq; 741 struct request *rq;
742 742
743 rq = blk_get_request(disk->gd->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); 743 rq = blk_get_request(disk->gd->queue, REQ_OP_DRV_IN, 0);
744 if (IS_ERR(rq)) 744 if (IS_ERR(rq))
745 return PTR_ERR(rq); 745 return PTR_ERR(rq);
746 746
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index c61d20c9f3f8..4880a4a9f52d 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -704,7 +704,7 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command *
704 int ret = 0; 704 int ret = 0;
705 705
706 rq = blk_get_request(q, (cgc->data_direction == CGC_DATA_WRITE) ? 706 rq = blk_get_request(q, (cgc->data_direction == CGC_DATA_WRITE) ?
707 REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, __GFP_RECLAIM); 707 REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
708 if (IS_ERR(rq)) 708 if (IS_ERR(rq))
709 return PTR_ERR(rq); 709 return PTR_ERR(rq);
710 710
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index 08586dc14e85..4d90e5eba2f5 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -567,7 +567,7 @@ static struct carm_request *carm_get_special(struct carm_host *host)
567 if (!crq) 567 if (!crq)
568 return NULL; 568 return NULL;
569 569
570 rq = blk_get_request(host->oob_q, REQ_OP_DRV_OUT, GFP_KERNEL); 570 rq = blk_get_request(host->oob_q, REQ_OP_DRV_OUT, 0);
571 if (IS_ERR(rq)) { 571 if (IS_ERR(rq)) {
572 spin_lock_irqsave(&host->lock, flags); 572 spin_lock_irqsave(&host->lock, flags);
573 carm_put_request(host, crq); 573 carm_put_request(host, crq);
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 4a07593c2efd..0617b9922d59 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -298,7 +298,7 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str)
298 struct request *req; 298 struct request *req;
299 int err; 299 int err;
300 300
301 req = blk_get_request(q, REQ_OP_DRV_IN, GFP_KERNEL); 301 req = blk_get_request(q, REQ_OP_DRV_IN, 0);
302 if (IS_ERR(req)) 302 if (IS_ERR(req))
303 return PTR_ERR(req); 303 return PTR_ERR(req);
304 304
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index bfc566d3f31a..9adc8c3eb0fa 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -2192,7 +2192,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
2192 2192
2193 len = nr * CD_FRAMESIZE_RAW; 2193 len = nr * CD_FRAMESIZE_RAW;
2194 2194
2195 rq = blk_get_request(q, REQ_OP_SCSI_IN, GFP_KERNEL); 2195 rq = blk_get_request(q, REQ_OP_SCSI_IN, 0);
2196 if (IS_ERR(rq)) { 2196 if (IS_ERR(rq)) {
2197 ret = PTR_ERR(rq); 2197 ret = PTR_ERR(rq);
2198 break; 2198 break;
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 0e6bc631a1ca..8b2b72b93885 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -92,7 +92,7 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk,
92 struct request *rq; 92 struct request *rq;
93 int error; 93 int error;
94 94
95 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); 95 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
96 ide_req(rq)->type = ATA_PRIV_MISC; 96 ide_req(rq)->type = ATA_PRIV_MISC;
97 rq->special = (char *)pc; 97 rq->special = (char *)pc;
98 98
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 5a8e8e3c22cd..32af6f063cb3 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -437,7 +437,7 @@ int ide_cd_queue_pc(ide_drive_t *drive, const unsigned char *cmd,
437 bool delay = false; 437 bool delay = false;
438 438
439 rq = blk_get_request(drive->queue, 439 rq = blk_get_request(drive->queue,
440 write ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, __GFP_RECLAIM); 440 write ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
441 memcpy(scsi_req(rq)->cmd, cmd, BLK_MAX_CDB); 441 memcpy(scsi_req(rq)->cmd, cmd, BLK_MAX_CDB);
442 ide_req(rq)->type = ATA_PRIV_PC; 442 ide_req(rq)->type = ATA_PRIV_PC;
443 rq->rq_flags |= rq_flags; 443 rq->rq_flags |= rq_flags;
diff --git a/drivers/ide/ide-cd_ioctl.c b/drivers/ide/ide-cd_ioctl.c
index 2acca12b9c94..b1322400887b 100644
--- a/drivers/ide/ide-cd_ioctl.c
+++ b/drivers/ide/ide-cd_ioctl.c
@@ -304,7 +304,7 @@ int ide_cdrom_reset(struct cdrom_device_info *cdi)
304 struct request *rq; 304 struct request *rq;
305 int ret; 305 int ret;
306 306
307 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); 307 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
308 ide_req(rq)->type = ATA_PRIV_MISC; 308 ide_req(rq)->type = ATA_PRIV_MISC;
309 rq->rq_flags = RQF_QUIET; 309 rq->rq_flags = RQF_QUIET;
310 blk_execute_rq(drive->queue, cd->disk, rq, 0); 310 blk_execute_rq(drive->queue, cd->disk, rq, 0);
diff --git a/drivers/ide/ide-devsets.c b/drivers/ide/ide-devsets.c
index 4e20747af32e..f4f8afdf8bbe 100644
--- a/drivers/ide/ide-devsets.c
+++ b/drivers/ide/ide-devsets.c
@@ -166,7 +166,7 @@ int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting,
166 if (!(setting->flags & DS_SYNC)) 166 if (!(setting->flags & DS_SYNC))
167 return setting->set(drive, arg); 167 return setting->set(drive, arg);
168 168
169 rq = blk_get_request(q, REQ_OP_DRV_IN, __GFP_RECLAIM); 169 rq = blk_get_request(q, REQ_OP_DRV_IN, 0);
170 ide_req(rq)->type = ATA_PRIV_MISC; 170 ide_req(rq)->type = ATA_PRIV_MISC;
171 scsi_req(rq)->cmd_len = 5; 171 scsi_req(rq)->cmd_len = 5;
172 scsi_req(rq)->cmd[0] = REQ_DEVSET_EXEC; 172 scsi_req(rq)->cmd[0] = REQ_DEVSET_EXEC;
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index f1a7c58fe418..e3b4e659082d 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -478,7 +478,7 @@ static int set_multcount(ide_drive_t *drive, int arg)
478 if (drive->special_flags & IDE_SFLAG_SET_MULTMODE) 478 if (drive->special_flags & IDE_SFLAG_SET_MULTMODE)
479 return -EBUSY; 479 return -EBUSY;
480 480
481 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); 481 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
482 ide_req(rq)->type = ATA_PRIV_TASKFILE; 482 ide_req(rq)->type = ATA_PRIV_TASKFILE;
483 483
484 drive->mult_req = arg; 484 drive->mult_req = arg;
diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c
index 3661abb16a5f..af5119a73689 100644
--- a/drivers/ide/ide-ioctls.c
+++ b/drivers/ide/ide-ioctls.c
@@ -125,7 +125,7 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg)
125 if (NULL == (void *) arg) { 125 if (NULL == (void *) arg) {
126 struct request *rq; 126 struct request *rq;
127 127
128 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); 128 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
129 ide_req(rq)->type = ATA_PRIV_TASKFILE; 129 ide_req(rq)->type = ATA_PRIV_TASKFILE;
130 blk_execute_rq(drive->queue, NULL, rq, 0); 130 blk_execute_rq(drive->queue, NULL, rq, 0);
131 err = scsi_req(rq)->result ? -EIO : 0; 131 err = scsi_req(rq)->result ? -EIO : 0;
@@ -222,7 +222,7 @@ static int generic_drive_reset(ide_drive_t *drive)
222 struct request *rq; 222 struct request *rq;
223 int ret = 0; 223 int ret = 0;
224 224
225 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); 225 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
226 ide_req(rq)->type = ATA_PRIV_MISC; 226 ide_req(rq)->type = ATA_PRIV_MISC;
227 scsi_req(rq)->cmd_len = 1; 227 scsi_req(rq)->cmd_len = 1;
228 scsi_req(rq)->cmd[0] = REQ_DRIVE_RESET; 228 scsi_req(rq)->cmd[0] = REQ_DRIVE_RESET;
diff --git a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c
index 6465bcc7cea6..622f0edb3945 100644
--- a/drivers/ide/ide-park.c
+++ b/drivers/ide/ide-park.c
@@ -32,7 +32,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout)
32 } 32 }
33 spin_unlock_irq(&hwif->lock); 33 spin_unlock_irq(&hwif->lock);
34 34
35 rq = blk_get_request(q, REQ_OP_DRV_IN, __GFP_RECLAIM); 35 rq = blk_get_request(q, REQ_OP_DRV_IN, 0);
36 scsi_req(rq)->cmd[0] = REQ_PARK_HEADS; 36 scsi_req(rq)->cmd[0] = REQ_PARK_HEADS;
37 scsi_req(rq)->cmd_len = 1; 37 scsi_req(rq)->cmd_len = 1;
38 ide_req(rq)->type = ATA_PRIV_MISC; 38 ide_req(rq)->type = ATA_PRIV_MISC;
@@ -47,7 +47,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout)
47 * Make sure that *some* command is sent to the drive after the 47 * Make sure that *some* command is sent to the drive after the
48 * timeout has expired, so power management will be reenabled. 48 * timeout has expired, so power management will be reenabled.
49 */ 49 */
50 rq = blk_get_request(q, REQ_OP_DRV_IN, GFP_NOWAIT); 50 rq = blk_get_request(q, REQ_OP_DRV_IN, BLK_MQ_REQ_NOWAIT);
51 if (IS_ERR(rq)) 51 if (IS_ERR(rq))
52 goto out; 52 goto out;
53 53
diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c
index ad8a125defdd..59217aa1d1fb 100644
--- a/drivers/ide/ide-pm.c
+++ b/drivers/ide/ide-pm.c
@@ -19,7 +19,7 @@ int generic_ide_suspend(struct device *dev, pm_message_t mesg)
19 } 19 }
20 20
21 memset(&rqpm, 0, sizeof(rqpm)); 21 memset(&rqpm, 0, sizeof(rqpm));
22 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); 22 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
23 ide_req(rq)->type = ATA_PRIV_PM_SUSPEND; 23 ide_req(rq)->type = ATA_PRIV_PM_SUSPEND;
24 rq->special = &rqpm; 24 rq->special = &rqpm;
25 rqpm.pm_step = IDE_PM_START_SUSPEND; 25 rqpm.pm_step = IDE_PM_START_SUSPEND;
@@ -90,8 +90,7 @@ int generic_ide_resume(struct device *dev)
90 } 90 }
91 91
92 memset(&rqpm, 0, sizeof(rqpm)); 92 memset(&rqpm, 0, sizeof(rqpm));
93 rq = blk_get_request_flags(drive->queue, REQ_OP_DRV_IN, 93 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, BLK_MQ_REQ_PREEMPT);
94 BLK_MQ_REQ_PREEMPT);
95 ide_req(rq)->type = ATA_PRIV_PM_RESUME; 94 ide_req(rq)->type = ATA_PRIV_PM_RESUME;
96 rq->special = &rqpm; 95 rq->special = &rqpm;
97 rqpm.pm_step = IDE_PM_START_RESUME; 96 rqpm.pm_step = IDE_PM_START_RESUME;
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index fd57e8ccc47a..66661031f3f1 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -854,7 +854,7 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int size)
854 BUG_ON(cmd != REQ_IDETAPE_READ && cmd != REQ_IDETAPE_WRITE); 854 BUG_ON(cmd != REQ_IDETAPE_READ && cmd != REQ_IDETAPE_WRITE);
855 BUG_ON(size < 0 || size % tape->blk_size); 855 BUG_ON(size < 0 || size % tape->blk_size);
856 856
857 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); 857 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
858 ide_req(rq)->type = ATA_PRIV_MISC; 858 ide_req(rq)->type = ATA_PRIV_MISC;
859 scsi_req(rq)->cmd[13] = cmd; 859 scsi_req(rq)->cmd[13] = cmd;
860 rq->rq_disk = tape->disk; 860 rq->rq_disk = tape->disk;
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index abe0822dd429..6308bb0dab50 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -431,7 +431,7 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf,
431 431
432 rq = blk_get_request(drive->queue, 432 rq = blk_get_request(drive->queue,
433 (cmd->tf_flags & IDE_TFLAG_WRITE) ? 433 (cmd->tf_flags & IDE_TFLAG_WRITE) ?
434 REQ_OP_DRV_OUT : REQ_OP_DRV_IN, __GFP_RECLAIM); 434 REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
435 ide_req(rq)->type = ATA_PRIV_TASKFILE; 435 ide_req(rq)->type = ATA_PRIV_TASKFILE;
436 436
437 /* 437 /*
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 203a0419d2b0..d94ba6f72ff5 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -520,7 +520,8 @@ static int multipath_clone_and_map(struct dm_target *ti, struct request *rq,
520 520
521 bdev = pgpath->path.dev->bdev; 521 bdev = pgpath->path.dev->bdev;
522 q = bdev_get_queue(bdev); 522 q = bdev_get_queue(bdev);
523 clone = blk_get_request(q, rq->cmd_flags | REQ_NOMERGE, GFP_ATOMIC); 523 clone = blk_get_request(q, rq->cmd_flags | REQ_NOMERGE,
524 BLK_MQ_REQ_NOWAIT);
524 if (IS_ERR(clone)) { 525 if (IS_ERR(clone)) {
525 /* EBUSY, ENODEV or EWOULDBLOCK: requeue */ 526 /* EBUSY, ENODEV or EWOULDBLOCK: requeue */
526 if (blk_queue_dying(q)) { 527 if (blk_queue_dying(q)) {
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 9e923cd1d80e..6e3bde824db8 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -244,7 +244,7 @@ static ssize_t power_ro_lock_store(struct device *dev,
244 mq = &md->queue; 244 mq = &md->queue;
245 245
246 /* Dispatch locking to the block layer */ 246 /* Dispatch locking to the block layer */
247 req = blk_get_request(mq->queue, REQ_OP_DRV_OUT, __GFP_RECLAIM); 247 req = blk_get_request(mq->queue, REQ_OP_DRV_OUT, 0);
248 if (IS_ERR(req)) { 248 if (IS_ERR(req)) {
249 count = PTR_ERR(req); 249 count = PTR_ERR(req);
250 goto out_put; 250 goto out_put;
@@ -650,8 +650,7 @@ static int mmc_blk_ioctl_cmd(struct mmc_blk_data *md,
650 */ 650 */
651 mq = &md->queue; 651 mq = &md->queue;
652 req = blk_get_request(mq->queue, 652 req = blk_get_request(mq->queue,
653 idata->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 653 idata->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
654 __GFP_RECLAIM);
655 if (IS_ERR(req)) { 654 if (IS_ERR(req)) {
656 err = PTR_ERR(req); 655 err = PTR_ERR(req);
657 goto cmd_done; 656 goto cmd_done;
@@ -721,8 +720,7 @@ static int mmc_blk_ioctl_multi_cmd(struct mmc_blk_data *md,
721 */ 720 */
722 mq = &md->queue; 721 mq = &md->queue;
723 req = blk_get_request(mq->queue, 722 req = blk_get_request(mq->queue,
724 idata[0]->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 723 idata[0]->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
725 __GFP_RECLAIM);
726 if (IS_ERR(req)) { 724 if (IS_ERR(req)) {
727 err = PTR_ERR(req); 725 err = PTR_ERR(req);
728 goto cmd_err; 726 goto cmd_err;
@@ -2750,7 +2748,7 @@ static int mmc_dbg_card_status_get(void *data, u64 *val)
2750 int ret; 2748 int ret;
2751 2749
2752 /* Ask the block layer about the card status */ 2750 /* Ask the block layer about the card status */
2753 req = blk_get_request(mq->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); 2751 req = blk_get_request(mq->queue, REQ_OP_DRV_IN, 0);
2754 if (IS_ERR(req)) 2752 if (IS_ERR(req))
2755 return PTR_ERR(req); 2753 return PTR_ERR(req);
2756 req_to_mmc_queue_req(req)->drv_op = MMC_DRV_OP_GET_CARD_STATUS; 2754 req_to_mmc_queue_req(req)->drv_op = MMC_DRV_OP_GET_CARD_STATUS;
@@ -2786,7 +2784,7 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp)
2786 return -ENOMEM; 2784 return -ENOMEM;
2787 2785
2788 /* Ask the block layer for the EXT CSD */ 2786 /* Ask the block layer for the EXT CSD */
2789 req = blk_get_request(mq->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); 2787 req = blk_get_request(mq->queue, REQ_OP_DRV_IN, 0);
2790 if (IS_ERR(req)) { 2788 if (IS_ERR(req)) {
2791 err = PTR_ERR(req); 2789 err = PTR_ERR(req);
2792 goto out_free; 2790 goto out_free;
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
index f48bae267dc2..5a33e1ad9881 100644
--- a/drivers/scsi/osd/osd_initiator.c
+++ b/drivers/scsi/osd/osd_initiator.c
@@ -1570,7 +1570,7 @@ static struct request *_make_request(struct request_queue *q, bool has_write,
1570 int ret; 1570 int ret;
1571 1571
1572 req = blk_get_request(q, has_write ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 1572 req = blk_get_request(q, has_write ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN,
1573 GFP_KERNEL); 1573 0);
1574 if (IS_ERR(req)) 1574 if (IS_ERR(req))
1575 return req; 1575 return req;
1576 1576
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 20ec1c01dbd5..2bbe797f8c3d 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -368,7 +368,7 @@ static int osst_execute(struct osst_request *SRpnt, const unsigned char *cmd,
368 int write = (data_direction == DMA_TO_DEVICE); 368 int write = (data_direction == DMA_TO_DEVICE);
369 369
370 req = blk_get_request(SRpnt->stp->device->request_queue, 370 req = blk_get_request(SRpnt->stp->device->request_queue,
371 write ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, GFP_KERNEL); 371 write ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
372 if (IS_ERR(req)) 372 if (IS_ERR(req))
373 return DRIVER_ERROR << 24; 373 return DRIVER_ERROR << 24;
374 374
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 946039117bf4..61d280f560df 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1937,7 +1937,7 @@ static void scsi_eh_lock_door(struct scsi_device *sdev)
1937 * blk_get_request with GFP_KERNEL (__GFP_RECLAIM) sleeps until a 1937 * blk_get_request with GFP_KERNEL (__GFP_RECLAIM) sleeps until a
1938 * request becomes available 1938 * request becomes available
1939 */ 1939 */
1940 req = blk_get_request(sdev->request_queue, REQ_OP_SCSI_IN, GFP_KERNEL); 1940 req = blk_get_request(sdev->request_queue, REQ_OP_SCSI_IN, 0);
1941 if (IS_ERR(req)) 1941 if (IS_ERR(req))
1942 return; 1942 return;
1943 rq = scsi_req(req); 1943 rq = scsi_req(req);
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index e9b4f279d29c..6b0f3ec487bd 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -265,7 +265,7 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
265 struct scsi_request *rq; 265 struct scsi_request *rq;
266 int ret = DRIVER_ERROR << 24; 266 int ret = DRIVER_ERROR << 24;
267 267
268 req = blk_get_request_flags(sdev->request_queue, 268 req = blk_get_request(sdev->request_queue,
269 data_direction == DMA_TO_DEVICE ? 269 data_direction == DMA_TO_DEVICE ?
270 REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, BLK_MQ_REQ_PREEMPT); 270 REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, BLK_MQ_REQ_PREEMPT);
271 if (IS_ERR(req)) 271 if (IS_ERR(req))
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index c198b96368dd..0512648ebc8e 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1715,7 +1715,7 @@ sg_start_req(Sg_request *srp, unsigned char *cmd)
1715 * does not sleep except under memory pressure. 1715 * does not sleep except under memory pressure.
1716 */ 1716 */
1717 rq = blk_get_request(q, hp->dxfer_direction == SG_DXFER_TO_DEV ? 1717 rq = blk_get_request(q, hp->dxfer_direction == SG_DXFER_TO_DEV ?
1718 REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, GFP_KERNEL); 1718 REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
1719 if (IS_ERR(rq)) { 1719 if (IS_ERR(rq)) {
1720 kfree(long_cmdp); 1720 kfree(long_cmdp);
1721 return PTR_ERR(rq); 1721 return PTR_ERR(rq);
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 6c399480783d..a427ce9497be 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -545,7 +545,7 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd,
545 545
546 req = blk_get_request(SRpnt->stp->device->request_queue, 546 req = blk_get_request(SRpnt->stp->device->request_queue,
547 data_direction == DMA_TO_DEVICE ? 547 data_direction == DMA_TO_DEVICE ?
548 REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, GFP_KERNEL); 548 REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
549 if (IS_ERR(req)) 549 if (IS_ERR(req))
550 return DRIVER_ERROR << 24; 550 return DRIVER_ERROR << 24;
551 rq = scsi_req(req); 551 rq = scsi_req(req);
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index 6cb933ecc084..668934ea74cb 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -986,8 +986,7 @@ pscsi_execute_cmd(struct se_cmd *cmd)
986 986
987 req = blk_get_request(pdv->pdv_sd->request_queue, 987 req = blk_get_request(pdv->pdv_sd->request_queue,
988 cmd->data_direction == DMA_TO_DEVICE ? 988 cmd->data_direction == DMA_TO_DEVICE ?
989 REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 989 REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
990 GFP_KERNEL);
991 if (IS_ERR(req)) { 990 if (IS_ERR(req)) {
992 pr_err("PSCSI: blk_get_request() failed\n"); 991 pr_err("PSCSI: blk_get_request() failed\n");
993 ret = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; 992 ret = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;