diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-06-24 02:04:35 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-06-24 02:04:35 +0300 |
commit | 9cb38381bac9f629fd4e7eafef27066c23c3eaf9 (patch) | |
tree | 865bf1f3b172139240e213d8fa4ce71c1d738026 | |
parent | 917b3c7c0bcf82f62afc1d046352933bd68db931 (diff) | |
parent | 9c39b7a905d84b7da5f59d80f2e455853fea7217 (diff) | |
download | linux-9cb38381bac9f629fd4e7eafef27066c23c3eaf9.tar.xz |
Merge tag 'block-6.4-2023-06-23' of git://git.kernel.dk/linux
Pull block fix from Jens Axboe:
"It's apparently the week of 'fixup something from last week', because
the same is true for this block pull request.
Fix up a lock grab that needs to be IRQ saving, rather than just IRQ
disabling, in the block cgroup code"
* tag 'block-6.4-2023-06-23' of git://git.kernel.dk/linux:
block: make sure local irq is disabled when calling __blkcg_rstat_flush
-rw-r--r-- | block/blk-cgroup.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index f0b5c9c41cde..dce1548a7a0c 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -970,6 +970,7 @@ static void __blkcg_rstat_flush(struct blkcg *blkcg, int cpu) struct llist_head *lhead = per_cpu_ptr(blkcg->lhead, cpu); struct llist_node *lnode; struct blkg_iostat_set *bisc, *next_bisc; + unsigned long flags; rcu_read_lock(); @@ -983,7 +984,7 @@ static void __blkcg_rstat_flush(struct blkcg *blkcg, int cpu) * When flushing from cgroup, cgroup_rstat_lock is always held, so * this lock won't cause contention most of time. */ - raw_spin_lock(&blkg_stat_lock); + raw_spin_lock_irqsave(&blkg_stat_lock, flags); /* * Iterate only the iostat_cpu's queued in the lockless list. @@ -1009,7 +1010,7 @@ static void __blkcg_rstat_flush(struct blkcg *blkcg, int cpu) blkcg_iostat_update(parent, &blkg->iostat.cur, &blkg->iostat.last); } - raw_spin_unlock(&blkg_stat_lock); + raw_spin_unlock_irqrestore(&blkg_stat_lock, flags); out: rcu_read_unlock(); } |