Skip to content

Commit

Permalink
[PATCH] __blk_rq_map_user() doesn't need to grab the queue_lock
Browse files Browse the repository at this point in the history
It was for driver private back_merge_fn hooks, but they don't exist
anymore.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Jens Axboe committed Dec 19, 2006
1 parent 1aa4f24 commit 9c9381f
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2359,26 +2359,17 @@ 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;
rq->biotail = bio;

rq->data_len += bio->bi_size;
}
spin_unlock_irq(q->queue_lock);

return bio->bi_size;

Expand Down

0 comments on commit 9c9381f

Please sign in to comment.