diff options
author | Jens Axboe <axboe@fb.com> | 2014-04-29 20:49:48 -0600 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-04-29 20:49:48 -0600 |
commit | 5810d903fa3459e703ce82a1d45136813c6afad8 (patch) | |
tree | ef916e48f6bced5a29de12ce29da9fa7e7b13ac4 /block/blk-mq-tag.c | |
parent | bdcfa3e57c9d92b082d2378bc9a64a3a8750fa8d (diff) | |
download | linux-5810d903fa3459e703ce82a1d45136813c6afad8.tar.bz2 |
blk-mq: fix waiting for reserved tags
blk_mq_wait_for_tags() is only able to wait for "normal" tags,
not reserved tags. Pass in which one we should attempt to get
a tag for, so that waiting for reserved tags will work.
Reserved tags are used for internal commands, which are usually
serialized. Hence no waiting generally takes place, but we should
ensure that it actually works if users need that functionality.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-tag.c')
-rw-r--r-- | block/blk-mq-tag.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index 7a799c46c32d..1f43d6ee956f 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -6,9 +6,9 @@ #include "blk-mq.h" #include "blk-mq-tag.h" -void blk_mq_wait_for_tags(struct blk_mq_tags *tags) +void blk_mq_wait_for_tags(struct blk_mq_tags *tags, bool reserved) { - int tag = blk_mq_get_tag(tags, __GFP_WAIT, false); + int tag = blk_mq_get_tag(tags, __GFP_WAIT, reserved); blk_mq_put_tag(tags, tag); } |