Switch everyone to blk_get_request_flags, and then rename blk_get_request_flags to blk_get_request.
Unified · Split
| @@ -1605,13 +1605,13 @@ static struct request *blk_old_get_request(struct request_queue *q, · 1604 unmodified lines | |||
| 1605 | } | 1605 | } |
| 1606 | 1606 | ||
| 1607 | /** | 1607 | /** |
| 1608 | * blk_get_request_flags - allocate a request | 1608 | * blk_get_request - allocate a request |
| 1609 | * @q: request queue to allocate a request for | 1609 | * @q: request queue to allocate a request for |
| 1610 | * @op: operation (REQ_OP_*) and REQ_* flags, e.g. REQ_SYNC. | 1610 | * @op: operation (REQ_OP_*) and REQ_* flags, e.g. REQ_SYNC. |
| 1611 | * @flags: BLK_MQ_REQ_* flags, e.g. BLK_MQ_REQ_NOWAIT. | 1611 | * @flags: BLK_MQ_REQ_* flags, e.g. BLK_MQ_REQ_NOWAIT. |
| 1612 | */ | 1612 | */ |
| 1613 | struct request *blk_get_request_flags(struct request_queue *q, unsigned int op, | 1613 | struct request *blk_get_request(struct request_queue *q, unsigned int op, |
| 1614 | blk_mq_req_flags_t flags) | 1614 | blk_mq_req_flags_t flags) |
| 1615 | { | 1615 | { |
| 1616 | struct request *req; | 1616 | struct request *req; |
| 1617 | 1617 | ||
| @@ -1630,14 +1630,6 @@ struct request *blk_get_request_flags(struct request_queue *q, unsigned int op, · 12 unmodified lines | |||
| 1630 | 1630 | ||
| 1631 | return req; | 1631 | return req; |
| 1632 | } | 1632 | } |
| 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 | } | ||
| 1641 | EXPORT_SYMBOL(blk_get_request); | 1633 | EXPORT_SYMBOL(blk_get_request); |
| 1642 | 1634 | ||
| 1643 | /** | 1635 | /** |
| @@ -226,8 +226,7 @@ bsg_map_hdr(struct request_queue *q, struct sg_io_v4 *hdr, fmode_t mode) · 225 unmodified lines | |||
| 226 | return ERR_PTR(ret); | 226 | return ERR_PTR(ret); |
| 227 | 227 | ||
| 228 | rq = blk_get_request(q, hdr->dout_xfer_len ? | 228 | rq = blk_get_request(q, hdr->dout_xfer_len ? |
| 229 | REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, | 229 | REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0); |
| 230 | GFP_KERNEL); | ||
| 231 | if (IS_ERR(rq)) | 230 | if (IS_ERR(rq)) |
| 232 | return rq; | 231 | return rq; |
| 233 | 232 | ||
| @@ -249,7 +248,7 @@ bsg_map_hdr(struct request_queue *q, struct sg_io_v4 *hdr, fmode_t mode) · 15 unmodified lines | |||
| 249 | goto out; | 248 | goto out; |
| 250 | } | 249 | } |
| 251 | 250 | ||
| 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); |
| 253 | if (IS_ERR(next_rq)) { | 252 | if (IS_ERR(next_rq)) { |
| 254 | ret = PTR_ERR(next_rq); | 253 | ret = PTR_ERR(next_rq); |
| 255 | goto out; | 254 | goto out; |
| @@ -321,8 +321,7 @@ static int sg_io(struct request_queue *q, struct gendisk *bd_disk, · 320 unmodified lines | |||
| 321 | at_head = 1; | 321 | at_head = 1; |
| 322 | 322 | ||
| 323 | ret = -ENOMEM; | 323 | ret = -ENOMEM; |
| 324 | rq = blk_get_request(q, writing ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, | 324 | rq = blk_get_request(q, writing ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0); |
| 325 | GFP_KERNEL); | ||
| 326 | if (IS_ERR(rq)) | 325 | if (IS_ERR(rq)) |
| 327 | return PTR_ERR(rq); | 326 | return PTR_ERR(rq); |
| 328 | req = scsi_req(rq); | 327 | 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 | |||
| 449 | 448 | ||
| 450 | } | 449 | } |
| 451 | 450 | ||
| 452 | rq = blk_get_request(q, in_len ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, | 451 | rq = blk_get_request(q, in_len ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0); |
| 453 | __GFP_RECLAIM); | ||
| 454 | if (IS_ERR(rq)) { | 452 | if (IS_ERR(rq)) { |
| 455 | err = PTR_ERR(rq); | 453 | err = PTR_ERR(rq); |
| 456 | goto error_free_buffer; | 454 | goto error_free_buffer; |
| @@ -538,7 +536,7 @@ static int __blk_send_generic(struct request_queue *q, struct gendisk *bd_disk, · 81 unmodified lines | |||
| 538 | struct request *rq; | 536 | struct request *rq; |
| 539 | int err; | 537 | int err; |
| 540 | 538 | ||
| 541 | rq = blk_get_request(q, REQ_OP_SCSI_OUT, __GFP_RECLAIM); | 539 | rq = blk_get_request(q, REQ_OP_SCSI_OUT, 0); |
| 542 | if (IS_ERR(rq)) | 540 | if (IS_ERR(rq)) |
| 543 | return PTR_ERR(rq); | 541 | return PTR_ERR(rq); |
| 544 | rq->timeout = BLK_DEFAULT_SG_TIMEOUT; | 542 | rq->timeout = BLK_DEFAULT_SG_TIMEOUT; |
| @@ -740,7 +740,7 @@ static int pd_special_command(struct pd_unit *disk, · 739 unmodified lines | |||
| 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 | ||
| @@ -704,7 +704,7 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command * · 703 unmodified lines | |||
| 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 | ||
| @@ -567,7 +567,7 @@ static struct carm_request *carm_get_special(struct carm_host *host) · 566 unmodified lines | |||
| 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); |
| @@ -298,7 +298,7 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str) · 297 unmodified lines | |||
| 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 | ||
| @@ -2192,7 +2192,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf, · 2191 unmodified lines | |||
| 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; |
| @@ -92,7 +92,7 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk, · 91 unmodified lines | |||
| 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 | ||
| @@ -437,7 +437,7 @@ int ide_cd_queue_pc(ide_drive_t *drive, const unsigned char *cmd, · 436 unmodified lines | |||
| 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; |
| @@ -304,7 +304,7 @@ int ide_cdrom_reset(struct cdrom_device_info *cdi) · 303 unmodified lines | |||
| 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); |
| @@ -166,7 +166,7 @@ int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting, · 165 unmodified lines | |||
| 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; |
| @@ -478,7 +478,7 @@ static int set_multcount(ide_drive_t *drive, int arg) · 477 unmodified lines | |||
| 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; |
| @@ -125,7 +125,7 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg) · 124 unmodified lines | |||
| 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) · 90 unmodified lines | |||
| 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; |
| @@ -32,7 +32,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout) · 31 unmodified lines | |||
| 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) · 8 unmodified lines | |||
| 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 | ||
| @@ -19,7 +19,7 @@ int generic_ide_suspend(struct device *dev, pm_message_t mesg) · 18 unmodified lines | |||
| 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) · 64 unmodified lines | |||
| 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; |
| @@ -854,7 +854,7 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int size) · 853 unmodified lines | |||
| 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; |
| @@ -431,7 +431,7 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf, · 430 unmodified lines | |||
| 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 | /* |
| @@ -520,7 +520,8 @@ static int multipath_clone_and_map(struct dm_target *ti, struct request *rq, · 519 unmodified lines | |||
| 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)) { |
| @@ -244,7 +244,7 @@ static ssize_t power_ro_lock_store(struct device *dev, · 243 unmodified lines | |||
| 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, · 399 unmodified lines | |||
| 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, · 63 unmodified lines | |||
| 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) · 2021 unmodified lines | |||
| 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) · 29 unmodified lines | |||
| 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; |
| @@ -1570,7 +1570,7 @@ static struct request *_make_request(struct request_queue *q, bool has_write, · 1569 unmodified lines | |||
| 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 | ||
| @@ -368,7 +368,7 @@ static int osst_execute(struct osst_request *SRpnt, const unsigned char *cmd, · 367 unmodified lines | |||
| 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 | ||
| @@ -1937,7 +1937,7 @@ static void scsi_eh_lock_door(struct scsi_device *sdev) · 1936 unmodified lines | |||
| 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); |
| @@ -265,7 +265,7 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, · 264 unmodified lines | |||
| 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)) |
| @@ -1715,7 +1715,7 @@ sg_start_req(Sg_request *srp, unsigned char *cmd) · 1714 unmodified lines | |||
| 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); |
| @@ -545,7 +545,7 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd, · 544 unmodified lines | |||
| 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); |
| @@ -986,8 +986,7 @@ pscsi_execute_cmd(struct se_cmd *cmd) · 985 unmodified lines | |||
| 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; |
| @@ -227,7 +227,7 @@ static int nfsd4_scsi_identify_device(struct block_device *bdev, · 226 unmodified lines | |||
| 227 | if (!buf) | 227 | if (!buf) |
| 228 | return -ENOMEM; | 228 | return -ENOMEM; |
| 229 | 229 | ||
| 230 | rq = blk_get_request(q, REQ_OP_SCSI_IN, GFP_KERNEL); | 230 | rq = blk_get_request(q, REQ_OP_SCSI_IN, 0); |
| 231 | if (IS_ERR(rq)) { | 231 | if (IS_ERR(rq)) { |
| 232 | error = -ENOMEM; | 232 | error = -ENOMEM; |
| 233 | goto out_free_buf; | 233 | goto out_free_buf; |
| @@ -976,11 +976,8 @@ extern void blk_rq_init(struct request_queue *q, struct request *rq); · 975 unmodified lines | |||
| 976 | extern void blk_init_request_from_bio(struct request *req, struct bio *bio); | 976 | extern void blk_init_request_from_bio(struct request *req, struct bio *bio); |
| 977 | extern void blk_put_request(struct request *); | 977 | extern void blk_put_request(struct request *); |
| 978 | extern void __blk_put_request(struct request_queue *, struct request *); | 978 | 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); | ||
| 982 | extern struct request *blk_get_request(struct request_queue *, unsigned int op, | 979 | extern struct request *blk_get_request(struct request_queue *, unsigned int op, |
| 983 | gfp_t gfp_mask); | 980 | blk_mq_req_flags_t flags); |
| 984 | extern void blk_requeue_request(struct request_queue *, struct request *); | 981 | extern void blk_requeue_request(struct request_queue *, struct request *); |
| 985 | extern int blk_lld_busy(struct request_queue *q); | 982 | extern int blk_lld_busy(struct request_queue *q); |
| 986 | extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, | 983 | extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, |