]> www.infradead.org Git - users/hch/misc.git/commitdiff
block: remove unnecessary check in blk_unfreeze_check_owner()
authorMing Lei <ming.lei@redhat.com>
Wed, 27 Nov 2024 13:51:27 +0000 (21:51 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 Dec 2024 13:58:30 +0000 (06:58 -0700)
The following check of 'q->mq_freeze_owner != current' covers the
previous one, so remove the unnecessary check.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20241127135133.3952153-2-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c

index 6b6111513986f225d97430fafdfbc106ff8ba0b5..dff58258e201902ba64fceec65fb2999a77d3f1a 100644 (file)
@@ -142,8 +142,6 @@ static bool blk_freeze_set_owner(struct request_queue *q,
 /* verify the last unfreeze in owner context */
 static bool blk_unfreeze_check_owner(struct request_queue *q)
 {
-       if (!q->mq_freeze_owner)
-               return false;
        if (q->mq_freeze_owner != current)
                return false;
        if (--q->mq_freeze_owner_depth == 0) {