Message ID | 20241007140709.1762881-1-g.ryurikov@securitycode.ru (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [5.10] block, bfq: remove useless checking in bfq_put_queue() | expand |
Hi, 在 2024/10/07 22:21, Jens Axboe 写道: > On 10/7/24 8:07 AM, George Rurikov wrote: >> From: George Ryurikov <g.ryurikov@securitycode.ru> >> >> From: Yu Kuai <yukuai3@huawei.com> >> >> commit 1e3cc2125d7cc7d492b2e6e52d09c1e17ba573c3 >> >> 'bfqq->bfqd' is ensured to set in bfq_init_queue(), and it will never >> change afterwards. > > No point pushing this to stable, so no from here. > Yes, and there are no follow up fixes as well. Thanks, Kuai
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 6687b805bab3..0031c5751d89 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -4864,9 +4864,7 @@ void bfq_put_queue(struct bfq_queue *bfqq) struct hlist_node *n; struct bfq_group *bfqg = bfqq_group(bfqq); - if (bfqq->bfqd) - bfq_log_bfqq(bfqq->bfqd, bfqq, "put_queue: %p %d", - bfqq, bfqq->ref); + bfq_log_bfqq(bfqq->bfqd, bfqq, "put_queue: %p %d", bfqq, bfqq->ref); bfqq->ref--; if (bfqq->ref) @@ -4931,7 +4929,7 @@ void bfq_put_queue(struct bfq_queue *bfqq) hlist_del_init(&item->woken_list_node); } - if (bfqq->bfqd && bfqq->bfqd->last_completed_rq_bfqq == bfqq) + if (bfqq->bfqd->last_completed_rq_bfqq == bfqq) bfqq->bfqd->last_completed_rq_bfqq = NULL; kmem_cache_free(bfq_pool, bfqq);