diff options
author | Christoph Hellwig <hch@lst.de> | 2018-05-09 10:54:07 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-05-14 17:55:16 +0300 |
commit | c3036021c7bd488a382ebb15bd48225941a8686e (patch) | |
tree | eeae51457bfa58e97961fadb60b86107bdad0923 /block | |
parent | 4accf5fc790b7e17d838265cc58a46b3ddf64721 (diff) | |
download | linux-c3036021c7bd488a382ebb15bd48225941a8686e.tar.xz |
block: use GFP_NOIO instead of __GFP_DIRECT_RECLAIM
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>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 1fe7c7cf42fe..341501c5e239 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -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); |