Message ID | bf149a4f4a73d21ed89e7d481eb92f46adb8bf6d.1606699505.git.asml.silence@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | cleanups/fix for blk_mq_get_tag() | expand |
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index 98f6ea219bb4..f2743a9159ca 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -96,10 +96,8 @@ unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data) int tag; if (data->flags & BLK_MQ_REQ_RESERVED) { - if (unlikely(!tags->nr_reserved_tags)) { - WARN_ON_ONCE(1); + if (WARN_ON_ONCE(!tags->nr_reserved_tags)) return BLK_MQ_NO_TAG; - } bt = tags->breserved_tags; } else { bt = tags->bitmap_tags;
Let WARN_ON_ONCE() to be more clear by passing the warn condition directly, so it'll be printed. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> --- block/blk-mq-tag.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)