diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-07-28 03:07:29 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-07-28 03:07:29 -0400 |
commit | a4e7d46407d73f35d217013b363b79a8f8eafcaa (patch) | |
tree | 109996edac0c6382e7a7cfb99736e75ea5398b49 /block/blk-settings.c | |
parent | a85a00a699740f6f9863f88aef22060fe1534681 (diff) |
block: always assign default lock to queues
Move the assignment of a default lock below blk_init_queue() to
blk_queue_make_request(), so we also get to set the default lock
for ->make_request_fn() based drivers. This is important since the
queue flag locking requires a lock to be in place.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-settings.c')
-rw-r--r-- | block/blk-settings.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c index bd582a7f5310..8a3ea3bba10d 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c | |||
@@ -165,6 +165,13 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn) | |||
165 | blk_set_default_limits(&q->limits); | 165 | blk_set_default_limits(&q->limits); |
166 | 166 | ||
167 | /* | 167 | /* |
168 | * If the caller didn't supply a lock, fall back to our embedded | ||
169 | * per-queue locks | ||
170 | */ | ||
171 | if (!q->queue_lock) | ||
172 | q->queue_lock = &q->__queue_lock; | ||
173 | |||
174 | /* | ||
168 | * by default assume old behaviour and bounce for any highmem page | 175 | * by default assume old behaviour and bounce for any highmem page |
169 | */ | 176 | */ |
170 | blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH); | 177 | blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH); |