diff options
author | Brian King <brking@us.ibm.com> | 2004-08-22 22:39:14 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-22 22:39:14 -0700 |
commit | 1111a1db197d724f06ca64a4473190dd87a84b51 (patch) | |
tree | 59f811b93cc6383341535fc75e1123b02138f243 /drivers | |
parent | ff2087ea36342cf593ea7935c90edd30aa99feb5 (diff) | |
download | history-1111a1db197d724f06ca64a4473190dd87a84b51.tar.gz |
[PATCH] blk_resize_tags() fix
init_tag_map should not initialize the busy_list, refcnt, or busy fields in
the tag map since blk_queue_resize_tags can call it while requests are
active. Patch moves this initialization into blk_queue_init_tags.
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/ll_rw_blk.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 28de3f55a89506..ee78c539a07ab3 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c @@ -600,9 +600,6 @@ init_tag_map(request_queue_t *q, struct blk_queue_tag *tags, int depth) for (i = depth; i < bits * BLK_TAGS_PER_LONG; i++) __set_bit(i, tags->tag_map); - INIT_LIST_HEAD(&tags->busy_list); - tags->busy = 0; - atomic_set(&tags->refcnt, 1); return 0; fail: kfree(tags->tag_index); @@ -628,6 +625,10 @@ int blk_queue_init_tags(request_queue_t *q, int depth, if (init_tag_map(q, tags, depth)) goto fail; + + INIT_LIST_HEAD(&tags->busy_list); + tags->busy = 0; + atomic_set(&tags->refcnt, 1); } else if (q->queue_tags) { if ((rc = blk_queue_resize_tags(q, depth))) return rc; |