block: sanitize blk_get_request calling conventions
authorChristoph Hellwig <hch@lst.de>
Wed, 9 May 2018 07:54:05 +0000 (09:54 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 14 May 2018 14:55:12 +0000 (08:55 -0600)
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>
29 files changed:
block/blk-core.c
block/bsg.c
block/scsi_ioctl.c
drivers/block/paride/pd.c
drivers/block/pktcdvd.c
drivers/block/sx8.c
drivers/block/virtio_blk.c
drivers/cdrom/cdrom.c
drivers/ide/ide-atapi.c
drivers/ide/ide-cd.c
drivers/ide/ide-cd_ioctl.c
drivers/ide/ide-devsets.c
drivers/ide/ide-disk.c
drivers/ide/ide-ioctls.c
drivers/ide/ide-park.c
drivers/ide/ide-pm.c
drivers/ide/ide-tape.c
drivers/ide/ide-taskfile.c
drivers/md/dm-mpath.c
drivers/mmc/core/block.c
drivers/scsi/osd/osd_initiator.c
drivers/scsi/osst.c
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c
drivers/scsi/sg.c
drivers/scsi/st.c
drivers/target/target_core_pscsi.c
fs/nfsd/blocklayout.c
include/linux/blkdev.h

index e78560f04d77e23c5b227f58b4bfc6c410c4ee8d..5da706ae344157604a6bd1fe8a6bd8e05a874d7c 100644 (file)
@@ -1605,13 +1605,13 @@ static struct request *blk_old_get_request(struct request_queue *q,
 }
 
 /**
- * blk_get_request_flags - allocate a request
+ * blk_get_request - allocate a request
  * @q: request queue to allocate a request for
  * @op: operation (REQ_OP_*) and REQ_* flags, e.g. REQ_SYNC.
  * @flags: BLK_MQ_REQ_* flags, e.g. BLK_MQ_REQ_NOWAIT.
  */
-struct request *blk_get_request_flags(struct request_queue *q, unsigned int op,
-                                     blk_mq_req_flags_t flags)
+struct request *blk_get_request(struct request_queue *q, unsigned int op,
+                               blk_mq_req_flags_t flags)
 {
        struct request *req;
 
@@ -1630,14 +1630,6 @@ struct request *blk_get_request_flags(struct request_queue *q, unsigned int op,
 
        return req;
 }
-EXPORT_SYMBOL(blk_get_request_flags);
-
-struct request *blk_get_request(struct request_queue *q, unsigned int op,
-                               gfp_t gfp_mask)
-{
-       return blk_get_request_flags(q, op, gfp_mask & __GFP_DIRECT_RECLAIM ?
-                                    0 : BLK_MQ_REQ_NOWAIT);
-}
 EXPORT_SYMBOL(blk_get_request);
 
 /**
index defa06c118587451b1cc0a2e4ce8d3ec48a16887..30876c5fbf1560eba2edc45ca59a3a005a2b798c 100644 (file)
@@ -226,8 +226,7 @@ bsg_map_hdr(struct request_queue *q, struct sg_io_v4 *hdr, fmode_t mode)
                return ERR_PTR(ret);
 
        rq = blk_get_request(q, hdr->dout_xfer_len ?
-                       REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN,
-                       GFP_KERNEL);
+                       REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
        if (IS_ERR(rq))
                return rq;
 
@@ -249,7 +248,7 @@ bsg_map_hdr(struct request_queue *q, struct sg_io_v4 *hdr, fmode_t mode)
                        goto out;
                }
 
-               next_rq = blk_get_request(q, REQ_OP_SCSI_IN, GFP_KERNEL);
+               next_rq = blk_get_request(q, REQ_OP_SCSI_IN, 0);
                if (IS_ERR(next_rq)) {
                        ret = PTR_ERR(next_rq);
                        goto out;
index 60b471f8621bfc5e2c4dae6370331560796eb542..04b54f9a415245c0c9c7beacdd41b98deaed3043 100644 (file)
@@ -321,8 +321,7 @@ static int sg_io(struct request_queue *q, struct gendisk *bd_disk,
                at_head = 1;
 
        ret = -ENOMEM;
-       rq = blk_get_request(q, writing ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN,
-                       GFP_KERNEL);
+       rq = blk_get_request(q, writing ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
        if (IS_ERR(rq))
                return PTR_ERR(rq);
        req = scsi_req(rq);
@@ -449,8 +448,7 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode,
 
        }
 
-       rq = blk_get_request(q, in_len ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN,
-                       __GFP_RECLAIM);
+       rq = blk_get_request(q, in_len ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
        if (IS_ERR(rq)) {
                err = PTR_ERR(rq);
                goto error_free_buffer;
@@ -538,7 +536,7 @@ static int __blk_send_generic(struct request_queue *q, struct gendisk *bd_disk,
        struct request *rq;
        int err;
 
-       rq = blk_get_request(q, REQ_OP_SCSI_OUT, __GFP_RECLAIM);
+       rq = blk_get_request(q, REQ_OP_SCSI_OUT, 0);
        if (IS_ERR(rq))
                return PTR_ERR(rq);
        rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
index 27a44b97393af0b63bf98c17dc98a6ea213761c1..8961b190e2566ccafa5d2a62c29951fada62e1d7 100644 (file)
@@ -740,7 +740,7 @@ static int pd_special_command(struct pd_unit *disk,
 {
        struct request *rq;
 
-       rq = blk_get_request(disk->gd->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
+       rq = blk_get_request(disk->gd->queue, REQ_OP_DRV_IN, 0);
        if (IS_ERR(rq))
                return PTR_ERR(rq);
 
index c61d20c9f3f8092f3aed69d859f137e7d67aef33..4880a4a9f52d488749d2766bcce1d08cc72cbd92 100644 (file)
@@ -704,7 +704,7 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command *
        int ret = 0;
 
        rq = blk_get_request(q, (cgc->data_direction == CGC_DATA_WRITE) ?
-                            REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, __GFP_RECLAIM);
+                            REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
        if (IS_ERR(rq))
                return PTR_ERR(rq);
 
index 08586dc14e853b8ed2c6cbc38566d66b21b35f90..4d90e5eba2f5e27d9f217696c5ec0c0f5e5f7be3 100644 (file)
@@ -567,7 +567,7 @@ static struct carm_request *carm_get_special(struct carm_host *host)
        if (!crq)
                return NULL;
 
-       rq = blk_get_request(host->oob_q, REQ_OP_DRV_OUT, GFP_KERNEL);
+       rq = blk_get_request(host->oob_q, REQ_OP_DRV_OUT, 0);
        if (IS_ERR(rq)) {
                spin_lock_irqsave(&host->lock, flags);
                carm_put_request(host, crq);
index 4a07593c2efddcbc98d0d8ca3d4fa13388da9c50..0617b9922d5952af6c30295b63038648658a6cca 100644 (file)
@@ -298,7 +298,7 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str)
        struct request *req;
        int err;
 
-       req = blk_get_request(q, REQ_OP_DRV_IN, GFP_KERNEL);
+       req = blk_get_request(q, REQ_OP_DRV_IN, 0);
        if (IS_ERR(req))
                return PTR_ERR(req);
 
index bfc566d3f31a40cf5b89d9284b2538644af68dee..9adc8c3eb0fa7affa56f8e9ade8bd2e62f8025a7 100644 (file)
@@ -2192,7 +2192,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
 
                len = nr * CD_FRAMESIZE_RAW;
 
-               rq = blk_get_request(q, REQ_OP_SCSI_IN, GFP_KERNEL);
+               rq = blk_get_request(q, REQ_OP_SCSI_IN, 0);
                if (IS_ERR(rq)) {
                        ret = PTR_ERR(rq);
                        break;
index 0e6bc631a1caf6d24928614ec1fc8b17ea4096bc..8b2b72b938857ca4bbbc4f533443f84abe13207d 100644 (file)
@@ -92,7 +92,7 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk,
        struct request *rq;
        int error;
 
-       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
+       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
        ide_req(rq)->type = ATA_PRIV_MISC;
        rq->special = (char *)pc;
 
index 5a8e8e3c22cdc7198286ecf7a3e303fe13a7b36c..32af6f063cb370e3bbaccba9af1a622769f0f007 100644 (file)
@@ -437,7 +437,7 @@ int ide_cd_queue_pc(ide_drive_t *drive, const unsigned char *cmd,
                bool delay = false;
 
                rq = blk_get_request(drive->queue,
-                       write ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN,  __GFP_RECLAIM);
+                       write ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
                memcpy(scsi_req(rq)->cmd, cmd, BLK_MAX_CDB);
                ide_req(rq)->type = ATA_PRIV_PC;
                rq->rq_flags |= rq_flags;
index 2acca12b9c946219b2e9e5e6e5cc5179baa4e545..b1322400887ba77865ce3afd899c629e9755884e 100644 (file)
@@ -304,7 +304,7 @@ int ide_cdrom_reset(struct cdrom_device_info *cdi)
        struct request *rq;
        int ret;
 
-       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
+       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
        ide_req(rq)->type = ATA_PRIV_MISC;
        rq->rq_flags = RQF_QUIET;
        blk_execute_rq(drive->queue, cd->disk, rq, 0);
index 4e20747af32e298a01b950cbda03db4050dcc802..f4f8afdf8bbe9b9d292bdfcbf58e4e2b876824f0 100644 (file)
@@ -166,7 +166,7 @@ int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting,
        if (!(setting->flags & DS_SYNC))
                return setting->set(drive, arg);
 
-       rq = blk_get_request(q, REQ_OP_DRV_IN, __GFP_RECLAIM);
+       rq = blk_get_request(q, REQ_OP_DRV_IN, 0);
        ide_req(rq)->type = ATA_PRIV_MISC;
        scsi_req(rq)->cmd_len = 5;
        scsi_req(rq)->cmd[0] = REQ_DEVSET_EXEC;
index f1a7c58fe4185bf804750539e4bb6d6f406f1a24..e3b4e659082d89a16dbcddbed9fa72157a0bf8f5 100644 (file)
@@ -478,7 +478,7 @@ static int set_multcount(ide_drive_t *drive, int arg)
        if (drive->special_flags & IDE_SFLAG_SET_MULTMODE)
                return -EBUSY;
 
-       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
+       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
        ide_req(rq)->type = ATA_PRIV_TASKFILE;
 
        drive->mult_req = arg;
index 3661abb16a5fc98acaa59eecb3ac7c810c35a7b7..af5119a73689bf4875a8bc1d68108bbabf5d541d 100644 (file)
@@ -125,7 +125,7 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg)
        if (NULL == (void *) arg) {
                struct request *rq;
 
-               rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
+               rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
                ide_req(rq)->type = ATA_PRIV_TASKFILE;
                blk_execute_rq(drive->queue, NULL, rq, 0);
                err = scsi_req(rq)->result ? -EIO : 0;
@@ -222,7 +222,7 @@ static int generic_drive_reset(ide_drive_t *drive)
        struct request *rq;
        int ret = 0;
 
-       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
+       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
        ide_req(rq)->type = ATA_PRIV_MISC;
        scsi_req(rq)->cmd_len = 1;
        scsi_req(rq)->cmd[0] = REQ_DRIVE_RESET;
index 6465bcc7cea6ae95dfffb3474e951bf41dcfe422..622f0edb3945440e59978c37c3a7b07e558408d7 100644 (file)
@@ -32,7 +32,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout)
        }
        spin_unlock_irq(&hwif->lock);
 
-       rq = blk_get_request(q, REQ_OP_DRV_IN, __GFP_RECLAIM);
+       rq = blk_get_request(q, REQ_OP_DRV_IN, 0);
        scsi_req(rq)->cmd[0] = REQ_PARK_HEADS;
        scsi_req(rq)->cmd_len = 1;
        ide_req(rq)->type = ATA_PRIV_MISC;
@@ -47,7 +47,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout)
         * Make sure that *some* command is sent to the drive after the
         * timeout has expired, so power management will be reenabled.
         */
-       rq = blk_get_request(q, REQ_OP_DRV_IN, GFP_NOWAIT);
+       rq = blk_get_request(q, REQ_OP_DRV_IN, BLK_MQ_REQ_NOWAIT);
        if (IS_ERR(rq))
                goto out;
 
index ad8a125defdd51133bada4a30d16f890e5223e31..59217aa1d1fb25fe6d5d4192f81552e42a98b5cb 100644 (file)
@@ -19,7 +19,7 @@ int generic_ide_suspend(struct device *dev, pm_message_t mesg)
        }
 
        memset(&rqpm, 0, sizeof(rqpm));
-       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
+       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
        ide_req(rq)->type = ATA_PRIV_PM_SUSPEND;
        rq->special = &rqpm;
        rqpm.pm_step = IDE_PM_START_SUSPEND;
@@ -90,8 +90,7 @@ int generic_ide_resume(struct device *dev)
        }
 
        memset(&rqpm, 0, sizeof(rqpm));
-       rq = blk_get_request_flags(drive->queue, REQ_OP_DRV_IN,
-                                  BLK_MQ_REQ_PREEMPT);
+       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, BLK_MQ_REQ_PREEMPT);
        ide_req(rq)->type = ATA_PRIV_PM_RESUME;
        rq->special = &rqpm;
        rqpm.pm_step = IDE_PM_START_RESUME;
index fd57e8ccc47ab9a22a6a377d5545713b333c01e1..66661031f3f17906496b691c610ddafced970695 100644 (file)
@@ -854,7 +854,7 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int size)
        BUG_ON(cmd != REQ_IDETAPE_READ && cmd != REQ_IDETAPE_WRITE);
        BUG_ON(size < 0 || size % tape->blk_size);
 
-       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
+       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
        ide_req(rq)->type = ATA_PRIV_MISC;
        scsi_req(rq)->cmd[13] = cmd;
        rq->rq_disk = tape->disk;
index abe0822dd429efc0af32be4cec86c583bbf2ea46..6308bb0dab5097bc6932caaf598a6307a93c82da 100644 (file)
@@ -431,7 +431,7 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf,
 
        rq = blk_get_request(drive->queue,
                (cmd->tf_flags & IDE_TFLAG_WRITE) ?
-                       REQ_OP_DRV_OUT : REQ_OP_DRV_IN, __GFP_RECLAIM);
+                       REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
        ide_req(rq)->type = ATA_PRIV_TASKFILE;
 
        /*
index 203a0419d2b04db1ffedb9ee022ea2533f3a9e28..d94ba6f72ff59e3723cc67337ff6bca21a472fda 100644 (file)
@@ -520,7 +520,8 @@ static int multipath_clone_and_map(struct dm_target *ti, struct request *rq,
 
        bdev = pgpath->path.dev->bdev;
        q = bdev_get_queue(bdev);
-       clone = blk_get_request(q, rq->cmd_flags | REQ_NOMERGE, GFP_ATOMIC);
+       clone = blk_get_request(q, rq->cmd_flags | REQ_NOMERGE,
+                       BLK_MQ_REQ_NOWAIT);
        if (IS_ERR(clone)) {
                /* EBUSY, ENODEV or EWOULDBLOCK: requeue */
                if (blk_queue_dying(q)) {
index 9e923cd1d80ebee9c96d70aceabb87b2a0935581..6e3bde824db877c81fa54ded4d5dda9b98ade72a 100644 (file)
@@ -244,7 +244,7 @@ static ssize_t power_ro_lock_store(struct device *dev,
        mq = &md->queue;
 
        /* Dispatch locking to the block layer */
-       req = blk_get_request(mq->queue, REQ_OP_DRV_OUT, __GFP_RECLAIM);
+       req = blk_get_request(mq->queue, REQ_OP_DRV_OUT, 0);
        if (IS_ERR(req)) {
                count = PTR_ERR(req);
                goto out_put;
@@ -650,8 +650,7 @@ static int mmc_blk_ioctl_cmd(struct mmc_blk_data *md,
         */
        mq = &md->queue;
        req = blk_get_request(mq->queue,
-               idata->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN,
-               __GFP_RECLAIM);
+               idata->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
        if (IS_ERR(req)) {
                err = PTR_ERR(req);
                goto cmd_done;
@@ -721,8 +720,7 @@ static int mmc_blk_ioctl_multi_cmd(struct mmc_blk_data *md,
         */
        mq = &md->queue;
        req = blk_get_request(mq->queue,
-               idata[0]->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN,
-               __GFP_RECLAIM);
+               idata[0]->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
        if (IS_ERR(req)) {
                err = PTR_ERR(req);
                goto cmd_err;
@@ -2750,7 +2748,7 @@ static int mmc_dbg_card_status_get(void *data, u64 *val)
        int ret;
 
        /* Ask the block layer about the card status */
-       req = blk_get_request(mq->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
+       req = blk_get_request(mq->queue, REQ_OP_DRV_IN, 0);
        if (IS_ERR(req))
                return PTR_ERR(req);
        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)
                return -ENOMEM;
 
        /* Ask the block layer for the EXT CSD */
-       req = blk_get_request(mq->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
+       req = blk_get_request(mq->queue, REQ_OP_DRV_IN, 0);
        if (IS_ERR(req)) {
                err = PTR_ERR(req);
                goto out_free;
index f48bae267dc2297f054c33b1885c36d8895d03a7..5a33e1ad98818dee7f3f880a0cba4a1a239105d7 100644 (file)
@@ -1570,7 +1570,7 @@ static struct request *_make_request(struct request_queue *q, bool has_write,
        int ret;
 
        req = blk_get_request(q, has_write ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN,
-                       GFP_KERNEL);
+                       0);
        if (IS_ERR(req))
                return req;
 
index 20ec1c01dbd5d1e0595aa41e397b898131f9d255..2bbe797f8c3dae62118c88b26537737a2215052a 100644 (file)
@@ -368,7 +368,7 @@ static int osst_execute(struct osst_request *SRpnt, const unsigned char *cmd,
        int write = (data_direction == DMA_TO_DEVICE);
 
        req = blk_get_request(SRpnt->stp->device->request_queue,
-                       write ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, GFP_KERNEL);
+                       write ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
        if (IS_ERR(req))
                return DRIVER_ERROR << 24;
 
index 946039117bf4f2c655db2bb1129ee75df1f1df21..61d280f560df734f69dbe3072d3101dd4267794e 100644 (file)
@@ -1937,7 +1937,7 @@ static void scsi_eh_lock_door(struct scsi_device *sdev)
         * blk_get_request with GFP_KERNEL (__GFP_RECLAIM) sleeps until a
         * request becomes available
         */
-       req = blk_get_request(sdev->request_queue, REQ_OP_SCSI_IN, GFP_KERNEL);
+       req = blk_get_request(sdev->request_queue, REQ_OP_SCSI_IN, 0);
        if (IS_ERR(req))
                return;
        rq = scsi_req(req);
index e9b4f279d29cb1de2b59f897b2f462bb8f7d3c9a..6b0f3ec487bd8fdaaad6199cba6fabd03b9e3ada 100644 (file)
@@ -265,7 +265,7 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
        struct scsi_request *rq;
        int ret = DRIVER_ERROR << 24;
 
-       req = blk_get_request_flags(sdev->request_queue,
+       req = blk_get_request(sdev->request_queue,
                        data_direction == DMA_TO_DEVICE ?
                        REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, BLK_MQ_REQ_PREEMPT);
        if (IS_ERR(req))
index c198b96368dd69beba2dcffbe16efe7a3c74ae1d..0512648ebc8ecafa232cff4ba57253c63de750cb 100644 (file)
@@ -1715,7 +1715,7 @@ sg_start_req(Sg_request *srp, unsigned char *cmd)
         * does not sleep except under memory pressure.
         */
        rq = blk_get_request(q, hp->dxfer_direction == SG_DXFER_TO_DEV ?
-                       REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, GFP_KERNEL);
+                       REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
        if (IS_ERR(rq)) {
                kfree(long_cmdp);
                return PTR_ERR(rq);
index 6c399480783d3051aac5ad65e9b4865ed99eca41..a427ce9497be9dc9b418dd55a80849cd958c2d47 100644 (file)
@@ -545,7 +545,7 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd,
 
        req = blk_get_request(SRpnt->stp->device->request_queue,
                        data_direction == DMA_TO_DEVICE ?
-                       REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, GFP_KERNEL);
+                       REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
        if (IS_ERR(req))
                return DRIVER_ERROR << 24;
        rq = scsi_req(req);
index 6cb933ecc084029f420fb2e13784a01f9c97e434..668934ea74cb8ff6e9e239bd1fa9a6da384b9c59 100644 (file)
@@ -986,8 +986,7 @@ pscsi_execute_cmd(struct se_cmd *cmd)
 
        req = blk_get_request(pdv->pdv_sd->request_queue,
                        cmd->data_direction == DMA_TO_DEVICE ?
-                       REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN,
-                       GFP_KERNEL);
+                       REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
        if (IS_ERR(req)) {
                pr_err("PSCSI: blk_get_request() failed\n");
                ret = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
index 70b8bf781fce3f034420fc2d25b7c008ac3d3180..a43dfedd69ec0ee91822e2513663719c31796724 100644 (file)
@@ -227,7 +227,7 @@ static int nfsd4_scsi_identify_device(struct block_device *bdev,
        if (!buf)
                return -ENOMEM;
 
-       rq = blk_get_request(q, REQ_OP_SCSI_IN, GFP_KERNEL);
+       rq = blk_get_request(q, REQ_OP_SCSI_IN, 0);
        if (IS_ERR(rq)) {
                error = -ENOMEM;
                goto out_free_buf;
index e42d510daf3c1f787906b8c51bb358b9c67e2a54..f3999719f8280d2444aea07bffb758c0b6e7f40a 100644 (file)
@@ -976,11 +976,8 @@ extern void blk_rq_init(struct request_queue *q, struct request *rq);
 extern void blk_init_request_from_bio(struct request *req, struct bio *bio);
 extern void blk_put_request(struct request *);
 extern void __blk_put_request(struct request_queue *, struct request *);
-extern struct request *blk_get_request_flags(struct request_queue *,
-                                            unsigned int op,
-                                            blk_mq_req_flags_t flags);
 extern struct request *blk_get_request(struct request_queue *, unsigned int op,
-                                      gfp_t gfp_mask);
+                                      blk_mq_req_flags_t flags);
 extern void blk_requeue_request(struct request_queue *, struct request *);
 extern int blk_lld_busy(struct request_queue *q);
 extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src,