Commit 1111a1db authored by Brian King's avatar Brian King Committed by Linus Torvalds

[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: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarBrian King <brking@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ff2087ea
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment