提交 9c9381f9 编写于 作者: J Jens Axboe

[PATCH] __blk_rq_map_user() doesn't need to grab the queue_lock

It was for driver private back_merge_fn hooks, but they don't exist
anymore.
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 1aa4f24f
......@@ -2359,18 +2359,10 @@ static int __blk_rq_map_user(request_queue_t *q, struct request *rq,
*/
bio_get(bio);
/*
* for most (all? don't know of any) queues we could
* skip grabbing the queue lock here. only drivers with
* funky private ->back_merge_fn() function could be
* problematic.
*/
spin_lock_irq(q->queue_lock);
if (!rq->bio)
blk_rq_bio_prep(q, rq, bio);
else if (!ll_back_merge_fn(q, rq, bio)) {
ret = -EINVAL;
spin_unlock_irq(q->queue_lock);
goto unmap_bio;
} else {
rq->biotail->bi_next = bio;
......@@ -2378,7 +2370,6 @@ static int __blk_rq_map_user(request_queue_t *q, struct request *rq,
rq->data_len += bio->bi_size;
}
spin_unlock_irq(q->queue_lock);
return bio->bi_size;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册