]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
block: use GFP_NOIO instead of __GFP_DIRECT_RECLAIM
authorChristoph Hellwig <hch@lst.de>
Wed, 9 May 2018 07:54:07 +0000 (09:54 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 14 May 2018 14:55:16 +0000 (08:55 -0600)
We just can't do I/O when doing block layer requests allocations,
so use GFP_NOIO instead of the even more limited __GFP_DIRECT_RECLAIM.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c

index 1fe7c7cf42fec73fc301bd93efe614eab0b35a66..341501c5e239d8c907da0b481e5cb7ffd1bc8146 100644 (file)
@@ -1577,8 +1577,7 @@ static struct request *blk_old_get_request(struct request_queue *q,
                                unsigned int op, blk_mq_req_flags_t flags)
 {
        struct request *rq;
-       gfp_t gfp_mask = flags & BLK_MQ_REQ_NOWAIT ? GFP_ATOMIC :
-                        __GFP_DIRECT_RECLAIM;
+       gfp_t gfp_mask = flags & BLK_MQ_REQ_NOWAIT ? GFP_ATOMIC : GFP_NOIO;
        int ret = 0;
 
        WARN_ON_ONCE(q->mq_ops);
@@ -2056,7 +2055,7 @@ get_rq:
         * Returns with the queue unlocked.
         */
        blk_queue_enter_live(q);
-       req = get_request(q, bio->bi_opf, bio, 0, __GFP_DIRECT_RECLAIM);
+       req = get_request(q, bio->bi_opf, bio, 0, GFP_NOIO);
        if (IS_ERR(req)) {
                blk_queue_exit(q);
                __wbt_done(q->rq_wb, wb_acct);