History

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.

Christoph Hellwig committed 8 years ago

Commit ff005a01 parent a9a14d329 files · +42 −59Browse files

Unified · Split

29 files
  1. block/blk-core.c +3 −11
  2. block/bsg.c +2 −3
  3. block/scsi_ioctl.c +3 −5
  4. drivers/block/paride/pd.c +1 −1
  5. drivers/block/pktcdvd.c +1 −1
  6. drivers/block/sx8.c +1 −1
  7. drivers/block/virtio_blk.c +1 −1
  8. drivers/cdrom/cdrom.c +1 −1
  9. drivers/ide/ide-atapi.c +1 −1
  10. drivers/ide/ide-cd.c +1 −1
  11. drivers/ide/ide-cd_ioctl.c +1 −1
  12. drivers/ide/ide-devsets.c +1 −1
  13. drivers/ide/ide-disk.c +1 −1
  14. drivers/ide/ide-ioctls.c +2 −2
  15. drivers/ide/ide-park.c +2 −2
  16. drivers/ide/ide-pm.c +2 −3
  17. drivers/ide/ide-tape.c +1 −1
  18. drivers/ide/ide-taskfile.c +1 −1
  19. drivers/md/dm-mpath.c +2 −1
  20. drivers/mmc/core/block.c +5 −7
  21. drivers/scsi/osd/osd_initiator.c +1 −1
  22. drivers/scsi/osst.c +1 −1
  23. drivers/scsi/scsi_error.c +1 −1
  24. drivers/scsi/scsi_lib.c +1 −1
  25. drivers/scsi/sg.c +1 −1
  26. drivers/scsi/st.c +1 −1
  27. drivers/target/target_core_pscsi.c +1 −2
  28. fs/nfsd/blocklayout.c +1 −1
  29. include/linux/blkdev.h +1 −4
block/blk-core.c+3−11
@@ -1605,13 +1605,13 @@ static struct request *blk_old_get_request(struct request_queue *q, · 1604 unmodified lines
16051605 }
16061606
16071607 /**
1608− * blk_get_request_flags - allocate a request
1608+ * blk_get_request - allocate a request
16091609 * @q: request queue to allocate a request for
16101610 * @op: operation (REQ_OP_*) and REQ_* flags, e.g. REQ_SYNC.
16111611 * @flags: BLK_MQ_REQ_* flags, e.g. BLK_MQ_REQ_NOWAIT.
16121612 */
1613−struct request *blk_get_request_flags(struct request_queue *q, unsigned int op,
1614− blk_mq_req_flags_t flags)
1613+struct request *blk_get_request(struct request_queue *q, unsigned int op,
1614+ blk_mq_req_flags_t flags)
16151615 {
16161616 struct request *req;
16171617
@@ -1630,14 +1630,6 @@ struct request *blk_get_request_flags(struct request_queue *q, unsigned int op, · 12 unmodified lines
16301630
16311631 return req;
16321632 }
1633−EXPORT_SYMBOL(blk_get_request_flags);
1634−
1635−struct request *blk_get_request(struct request_queue *q, unsigned int op,
1636− gfp_t gfp_mask)
1637−{
1638− return blk_get_request_flags(q, op, gfp_mask & __GFP_DIRECT_RECLAIM ?
1639− 0 : BLK_MQ_REQ_NOWAIT);
1640−}
16411633 EXPORT_SYMBOL(blk_get_request);
16421634
16431635 /**
block/bsg.c+2−3
@@ -226,8 +226,7 @@ bsg_map_hdr(struct request_queue *q, struct sg_io_v4 *hdr, fmode_t mode) · 225 unmodified lines
226226 return ERR_PTR(ret);
227227
228228 rq = blk_get_request(q, hdr->dout_xfer_len ?
229− REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN,
230− GFP_KERNEL);
229+ REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
231230 if (IS_ERR(rq))
232231 return rq;
233232
@@ -249,7 +248,7 @@ bsg_map_hdr(struct request_queue *q, struct sg_io_v4 *hdr, fmode_t mode) · 15 unmodified lines
249248 goto out;
250249 }
251250
252− next_rq = blk_get_request(q, REQ_OP_SCSI_IN, GFP_KERNEL);
251+ next_rq = blk_get_request(q, REQ_OP_SCSI_IN, 0);
253252 if (IS_ERR(next_rq)) {
254253 ret = PTR_ERR(next_rq);
255254 goto out;
block/scsi_ioctl.c+3−5
@@ -321,8 +321,7 @@ static int sg_io(struct request_queue *q, struct gendisk *bd_disk, · 320 unmodified lines
321321 at_head = 1;
322322
323323 ret = -ENOMEM;
324− rq = blk_get_request(q, writing ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN,
325− GFP_KERNEL);
324+ rq = blk_get_request(q, writing ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
326325 if (IS_ERR(rq))
327326 return PTR_ERR(rq);
328327 req = scsi_req(rq);
@@ -449,8 +448,7 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, · 120 unmodified lines
449448
450449 }
451450
452− rq = blk_get_request(q, in_len ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN,
453− __GFP_RECLAIM);
451+ rq = blk_get_request(q, in_len ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
454452 if (IS_ERR(rq)) {
455453 err = PTR_ERR(rq);
456454 goto error_free_buffer;
@@ -538,7 +536,7 @@ static int __blk_send_generic(struct request_queue *q, struct gendisk *bd_disk, · 81 unmodified lines
538536 struct request *rq;
539537 int err;
540538
541− rq = blk_get_request(q, REQ_OP_SCSI_OUT, __GFP_RECLAIM);
539+ rq = blk_get_request(q, REQ_OP_SCSI_OUT, 0);
542540 if (IS_ERR(rq))
543541 return PTR_ERR(rq);
544542 rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
drivers/block/paride/pd.c+1−1
@@ -740,7 +740,7 @@ static int pd_special_command(struct pd_unit *disk, · 739 unmodified lines
740740 {
741741 struct request *rq;
742742
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);
744744 if (IS_ERR(rq))
745745 return PTR_ERR(rq);
746746
drivers/block/pktcdvd.c+1−1
@@ -704,7 +704,7 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command * · 703 unmodified lines
704704 int ret = 0;
705705
706706 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);
708708 if (IS_ERR(rq))
709709 return PTR_ERR(rq);
710710
drivers/block/sx8.c+1−1
@@ -567,7 +567,7 @@ static struct carm_request *carm_get_special(struct carm_host *host) · 566 unmodified lines
567567 if (!crq)
568568 return NULL;
569569
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);
571571 if (IS_ERR(rq)) {
572572 spin_lock_irqsave(&host->lock, flags);
573573 carm_put_request(host, crq);
drivers/block/virtio_blk.c+1−1
@@ -298,7 +298,7 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str) · 297 unmodified lines
298298 struct request *req;
299299 int err;
300300
301− req = blk_get_request(q, REQ_OP_DRV_IN, GFP_KERNEL);
301+ req = blk_get_request(q, REQ_OP_DRV_IN, 0);
302302 if (IS_ERR(req))
303303 return PTR_ERR(req);
304304
drivers/cdrom/cdrom.c+1−1
@@ -2192,7 +2192,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf, · 2191 unmodified lines
21922192
21932193 len = nr * CD_FRAMESIZE_RAW;
21942194
2195− rq = blk_get_request(q, REQ_OP_SCSI_IN, GFP_KERNEL);
2195+ rq = blk_get_request(q, REQ_OP_SCSI_IN, 0);
21962196 if (IS_ERR(rq)) {
21972197 ret = PTR_ERR(rq);
21982198 break;
drivers/ide/ide-atapi.c+1−1
@@ -92,7 +92,7 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk, · 91 unmodified lines
9292 struct request *rq;
9393 int error;
9494
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);
9696 ide_req(rq)->type = ATA_PRIV_MISC;
9797 rq->special = (char *)pc;
9898
drivers/ide/ide-cd.c+1−1
@@ -437,7 +437,7 @@ int ide_cd_queue_pc(ide_drive_t *drive, const unsigned char *cmd, · 436 unmodified lines
437437 bool delay = false;
438438
439439 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);
441441 memcpy(scsi_req(rq)->cmd, cmd, BLK_MAX_CDB);
442442 ide_req(rq)->type = ATA_PRIV_PC;
443443 rq->rq_flags |= rq_flags;
drivers/ide/ide-cd_ioctl.c+1−1
@@ -304,7 +304,7 @@ int ide_cdrom_reset(struct cdrom_device_info *cdi) · 303 unmodified lines
304304 struct request *rq;
305305 int ret;
306306
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);
308308 ide_req(rq)->type = ATA_PRIV_MISC;
309309 rq->rq_flags = RQF_QUIET;
310310 blk_execute_rq(drive->queue, cd->disk, rq, 0);
drivers/ide/ide-devsets.c+1−1
@@ -166,7 +166,7 @@ int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting, · 165 unmodified lines
166166 if (!(setting->flags & DS_SYNC))
167167 return setting->set(drive, arg);
168168
169− rq = blk_get_request(q, REQ_OP_DRV_IN, __GFP_RECLAIM);
169+ rq = blk_get_request(q, REQ_OP_DRV_IN, 0);
170170 ide_req(rq)->type = ATA_PRIV_MISC;
171171 scsi_req(rq)->cmd_len = 5;
172172 scsi_req(rq)->cmd[0] = REQ_DEVSET_EXEC;
drivers/ide/ide-disk.c+1−1
@@ -478,7 +478,7 @@ static int set_multcount(ide_drive_t *drive, int arg) · 477 unmodified lines
478478 if (drive->special_flags & IDE_SFLAG_SET_MULTMODE)
479479 return -EBUSY;
480480
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);
482482 ide_req(rq)->type = ATA_PRIV_TASKFILE;
483483
484484 drive->mult_req = arg;
drivers/ide/ide-ioctls.c+2−2
@@ -125,7 +125,7 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg) · 124 unmodified lines
125125 if (NULL == (void *) arg) {
126126 struct request *rq;
127127
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);
129129 ide_req(rq)->type = ATA_PRIV_TASKFILE;
130130 blk_execute_rq(drive->queue, NULL, rq, 0);
131131 err = scsi_req(rq)->result ? -EIO : 0;
@@ -222,7 +222,7 @@ static int generic_drive_reset(ide_drive_t *drive) · 90 unmodified lines
222222 struct request *rq;
223223 int ret = 0;
224224
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);
226226 ide_req(rq)->type = ATA_PRIV_MISC;
227227 scsi_req(rq)->cmd_len = 1;
228228 scsi_req(rq)->cmd[0] = REQ_DRIVE_RESET;
drivers/ide/ide-park.c+2−2
@@ -32,7 +32,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout) · 31 unmodified lines
3232 }
3333 spin_unlock_irq(&hwif->lock);
3434
35− rq = blk_get_request(q, REQ_OP_DRV_IN, __GFP_RECLAIM);
35+ rq = blk_get_request(q, REQ_OP_DRV_IN, 0);
3636 scsi_req(rq)->cmd[0] = REQ_PARK_HEADS;
3737 scsi_req(rq)->cmd_len = 1;
3838 ide_req(rq)->type = ATA_PRIV_MISC;
@@ -47,7 +47,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout) · 8 unmodified lines
4747 * Make sure that *some* command is sent to the drive after the
4848 * timeout has expired, so power management will be reenabled.
4949 */
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);
5151 if (IS_ERR(rq))
5252 goto out;
5353
drivers/ide/ide-pm.c+2−3
@@ -19,7 +19,7 @@ int generic_ide_suspend(struct device *dev, pm_message_t mesg) · 18 unmodified lines
1919 }
2020
2121 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);
2323 ide_req(rq)->type = ATA_PRIV_PM_SUSPEND;
2424 rq->special = &rqpm;
2525 rqpm.pm_step = IDE_PM_START_SUSPEND;
@@ -90,8 +90,7 @@ int generic_ide_resume(struct device *dev) · 64 unmodified lines
9090 }
9191
9292 memset(&rqpm, 0, sizeof(rqpm));
93− rq = blk_get_request_flags(drive->queue, REQ_OP_DRV_IN,
94− BLK_MQ_REQ_PREEMPT);
93+ rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, BLK_MQ_REQ_PREEMPT);
9594 ide_req(rq)->type = ATA_PRIV_PM_RESUME;
9695 rq->special = &rqpm;
9796 rqpm.pm_step = IDE_PM_START_RESUME;
drivers/ide/ide-tape.c+1−1
@@ -854,7 +854,7 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int size) · 853 unmodified lines
854854 BUG_ON(cmd != REQ_IDETAPE_READ && cmd != REQ_IDETAPE_WRITE);
855855 BUG_ON(size < 0 || size % tape->blk_size);
856856
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);
858858 ide_req(rq)->type = ATA_PRIV_MISC;
859859 scsi_req(rq)->cmd[13] = cmd;
860860 rq->rq_disk = tape->disk;
drivers/ide/ide-taskfile.c+1−1
@@ -431,7 +431,7 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf, · 430 unmodified lines
431431
432432 rq = blk_get_request(drive->queue,
433433 (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);
435435 ide_req(rq)->type = ATA_PRIV_TASKFILE;
436436
437437 /*
drivers/md/dm-mpath.c+2−1
@@ -520,7 +520,8 @@ static int multipath_clone_and_map(struct dm_target *ti, struct request *rq, · 519 unmodified lines
520520
521521 bdev = pgpath->path.dev->bdev;
522522 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);
524525 if (IS_ERR(clone)) {
525526 /* EBUSY, ENODEV or EWOULDBLOCK: requeue */
526527 if (blk_queue_dying(q)) {
drivers/mmc/core/block.c+5−7
@@ -244,7 +244,7 @@ static ssize_t power_ro_lock_store(struct device *dev, · 243 unmodified lines
244244 mq = &md->queue;
245245
246246 /* 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);
248248 if (IS_ERR(req)) {
249249 count = PTR_ERR(req);
250250 goto out_put;
@@ -650,8 +650,7 @@ static int mmc_blk_ioctl_cmd(struct mmc_blk_data *md, · 399 unmodified lines
650650 */
651651 mq = &md->queue;
652652 req = blk_get_request(mq->queue,
653− idata->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN,
654− __GFP_RECLAIM);
653+ idata->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
655654 if (IS_ERR(req)) {
656655 err = PTR_ERR(req);
657656 goto cmd_done;
@@ -721,8 +720,7 @@ static int mmc_blk_ioctl_multi_cmd(struct mmc_blk_data *md, · 63 unmodified lines
721720 */
722721 mq = &md->queue;
723722 req = blk_get_request(mq->queue,
724− idata[0]->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN,
725− __GFP_RECLAIM);
723+ idata[0]->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
726724 if (IS_ERR(req)) {
727725 err = PTR_ERR(req);
728726 goto cmd_err;
@@ -2750,7 +2748,7 @@ static int mmc_dbg_card_status_get(void *data, u64 *val) · 2021 unmodified lines
27502748 int ret;
27512749
27522750 /* 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);
27542752 if (IS_ERR(req))
27552753 return PTR_ERR(req);
27562754 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) · 29 unmodified lines
27862784 return -ENOMEM;
27872785
27882786 /* 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);
27902788 if (IS_ERR(req)) {
27912789 err = PTR_ERR(req);
27922790 goto out_free;
drivers/scsi/osd/osd_initiator.c+1−1
@@ -1570,7 +1570,7 @@ static struct request *_make_request(struct request_queue *q, bool has_write, · 1569 unmodified lines
15701570 int ret;
15711571
15721572 req = blk_get_request(q, has_write ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN,
1573− GFP_KERNEL);
1573+ 0);
15741574 if (IS_ERR(req))
15751575 return req;
15761576
drivers/scsi/osst.c+1−1
@@ -368,7 +368,7 @@ static int osst_execute(struct osst_request *SRpnt, const unsigned char *cmd, · 367 unmodified lines
368368 int write = (data_direction == DMA_TO_DEVICE);
369369
370370 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);
372372 if (IS_ERR(req))
373373 return DRIVER_ERROR << 24;
374374
drivers/scsi/scsi_error.c+1−1
@@ -1937,7 +1937,7 @@ static void scsi_eh_lock_door(struct scsi_device *sdev) · 1936 unmodified lines
19371937 * blk_get_request with GFP_KERNEL (__GFP_RECLAIM) sleeps until a
19381938 * request becomes available
19391939 */
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);
19411941 if (IS_ERR(req))
19421942 return;
19431943 rq = scsi_req(req);
drivers/scsi/scsi_lib.c+1−1
@@ -265,7 +265,7 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, · 264 unmodified lines
265265 struct scsi_request *rq;
266266 int ret = DRIVER_ERROR << 24;
267267
268− req = blk_get_request_flags(sdev->request_queue,
268+ req = blk_get_request(sdev->request_queue,
269269 data_direction == DMA_TO_DEVICE ?
270270 REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, BLK_MQ_REQ_PREEMPT);
271271 if (IS_ERR(req))
drivers/scsi/sg.c+1−1
@@ -1715,7 +1715,7 @@ sg_start_req(Sg_request *srp, unsigned char *cmd) · 1714 unmodified lines
17151715 * does not sleep except under memory pressure.
17161716 */
17171717 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);
17191719 if (IS_ERR(rq)) {
17201720 kfree(long_cmdp);
17211721 return PTR_ERR(rq);
drivers/scsi/st.c+1−1
@@ -545,7 +545,7 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd, · 544 unmodified lines
545545
546546 req = blk_get_request(SRpnt->stp->device->request_queue,
547547 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);
549549 if (IS_ERR(req))
550550 return DRIVER_ERROR << 24;
551551 rq = scsi_req(req);
drivers/target/target_core_pscsi.c+1−2
@@ -986,8 +986,7 @@ pscsi_execute_cmd(struct se_cmd *cmd) · 985 unmodified lines
986986
987987 req = blk_get_request(pdv->pdv_sd->request_queue,
988988 cmd->data_direction == DMA_TO_DEVICE ?
989− REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN,
990− GFP_KERNEL);
989+ REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
991990 if (IS_ERR(req)) {
992991 pr_err("PSCSI: blk_get_request() failed\n");
993992 ret = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
fs/nfsd/blocklayout.c+1−1
@@ -227,7 +227,7 @@ static int nfsd4_scsi_identify_device(struct block_device *bdev, · 226 unmodified lines
227227 if (!buf)
228228 return -ENOMEM;
229229
230− rq = blk_get_request(q, REQ_OP_SCSI_IN, GFP_KERNEL);
230+ rq = blk_get_request(q, REQ_OP_SCSI_IN, 0);
231231 if (IS_ERR(rq)) {
232232 error = -ENOMEM;
233233 goto out_free_buf;
include/linux/blkdev.h+1−4
@@ -976,11 +976,8 @@ extern void blk_rq_init(struct request_queue *q, struct request *rq); · 975 unmodified lines
976976 extern void blk_init_request_from_bio(struct request *req, struct bio *bio);
977977 extern void blk_put_request(struct request *);
978978 extern void __blk_put_request(struct request_queue *, struct request *);
979−extern struct request *blk_get_request_flags(struct request_queue *,
980− unsigned int op,
981− blk_mq_req_flags_t flags);
982979 extern struct request *blk_get_request(struct request_queue *, unsigned int op,
983− gfp_t gfp_mask);
980+ blk_mq_req_flags_t flags);
984981 extern void blk_requeue_request(struct request_queue *, struct request *);
985982 extern int blk_lld_busy(struct request_queue *q);
986983 extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src,