mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 22:09:30 +02:00
block/bfq-cgroup: use data_race() for online test
bfqg_prfill_stat_recursive() and bfq_bio_bfqg() read blkg->online locklessly, same as blkg_rwstat_recursive_sum(). Annotate with data_race() to silence KCSAN. Signed-off-by: Tao Cui <cuitao@kylinos.cn> Reviewed-by: Yu Kuai <yukuai@fygo.io> Link: https://patch.msgid.link/20260803134104.138411-1-cui.tao@linux.dev Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
+2
-2
@@ -610,7 +610,7 @@ struct bfq_group *bfq_bio_bfqg(struct bfq_data *bfqd, struct bio *bio)
|
||||
struct bfq_group *bfqg;
|
||||
|
||||
while (blkg) {
|
||||
if (!blkg->online) {
|
||||
if (!data_race(blkg->online)) {
|
||||
blkg = blkg->parent;
|
||||
continue;
|
||||
}
|
||||
@@ -1168,7 +1168,7 @@ static u64 bfqg_prfill_stat_recursive(struct seq_file *sf,
|
||||
struct blkg_policy_data *pd;
|
||||
struct bfq_stat *stat;
|
||||
|
||||
if (!pos_blkg->online)
|
||||
if (!data_race(pos_blkg->online))
|
||||
continue;
|
||||
|
||||
pd = blkg_to_pd(pos_blkg, &blkcg_policy_bfq);
|
||||
|
||||
Reference in New Issue
Block a user