You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
blk-mq: Exit queue on alloc failure
Fixes usage counter when a request could not be allocated. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
+3
-1
@@ -258,8 +258,10 @@ struct request *blk_mq_alloc_request(struct request_queue *q, int rw, gfp_t gfp,
|
|||||||
ctx = alloc_data.ctx;
|
ctx = alloc_data.ctx;
|
||||||
}
|
}
|
||||||
blk_mq_put_ctx(ctx);
|
blk_mq_put_ctx(ctx);
|
||||||
if (!rq)
|
if (!rq) {
|
||||||
|
blk_mq_queue_exit(q);
|
||||||
return ERR_PTR(-EWOULDBLOCK);
|
return ERR_PTR(-EWOULDBLOCK);
|
||||||
|
}
|
||||||
return rq;
|
return rq;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(blk_mq_alloc_request);
|
EXPORT_SYMBOL(blk_mq_alloc_request);
|
||||||
|
|||||||
Reference in New Issue
Block a user