summaryrefslogtreecommitdiff
path: root/lib/cpu-notifier-error-inject.c
diff options
context:
space:
mode:
authorNilay Shroff <nilay@linux.ibm.com>2025-08-14 13:54:58 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-28 16:34:50 +0200
commita277d8870a6c3a3d15b1b647c5f73ac1e6b7047f (patch)
tree7d2109a9674f56430b1b6e3cea1fd34be1a60be3 /lib/cpu-notifier-error-inject.c
parentf9a9098ca82612006b9c71ce03b8fe189a437370 (diff)
block: decrement block_rq_qos static key in rq_qos_del()
[ Upstream commit ade1beea1c27657712aa8f594226d461639382ff ] rq_qos_add() increments the block_rq_qos static key when a QoS policy is attached. When a QoS policy is removed via rq_qos_del(), we must symmetrically decrement the static key. If this removal drops the last QoS policy from the queue (q->rq_qos becomes NULL), the static branch can be disabled and the jump label patched to a NOP, avoiding overhead on the hot path. This change ensures rq_qos_add()/rq_qos_del() keep the block_rq_qos static key balanced and prevents leaving the branch permanently enabled after the last policy is removed. Fixes: 033b667a823e ("block: blk-rq-qos: guard rq-qos helpers by static key") Signed-off-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Yu Kuai <yukuai3@huawei.com> Link: https://lore.kernel.org/r/20250814082612.500845-3-nilay@linux.ibm.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib/cpu-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions