diff options
| author | Tao Cui <cuitao@kylinos.cn> | 2026-05-16 13:25:37 +0800 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-05-18 09:24:50 -1000 |
| commit | 0d25e3865841ea5edfedb5af42bf15cef075192e (patch) | |
| tree | 33ce017c7864ae82883ef660de74de62828097dd | |
| parent | 1dffd95575eb05bc7ec20ec096ce73be4c5d1ed5 (diff) | |
cgroup/rdma: Drop unnecessary READ_ONCE() on event counters
All accesses to the event counters are serialized by rdmacg_mutex,
making the READ_ONCE() annotations unnecessary. Remove them.
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
| -rw-r--r-- | kernel/cgroup/rdma.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/cgroup/rdma.c b/kernel/cgroup/rdma.c index 7c238a9d64d4..5e82a03b3270 100644 --- a/kernel/cgroup/rdma.c +++ b/kernel/cgroup/rdma.c @@ -145,10 +145,10 @@ static bool rpool_has_persistent_state(struct rdmacg_resource_pool *rpool) */ for (i = 0; i < RDMACG_RESOURCE_MAX; i++) { if (rpool->resources[i].peak || - READ_ONCE(rpool->events_max[i]) || - READ_ONCE(rpool->events_local_max[i]) || - READ_ONCE(rpool->events_alloc_fail[i]) || - READ_ONCE(rpool->events_local_alloc_fail[i])) + rpool->events_max[i] || + rpool->events_local_max[i] || + rpool->events_alloc_fail[i] || + rpool->events_local_alloc_fail[i]) return true; } return false; @@ -654,9 +654,9 @@ static int rdmacg_events_show(struct seq_file *sf, void *v) for (i = 0; i < RDMACG_RESOURCE_MAX; i++) { seq_printf(sf, "%s.max=%llu %s.alloc_fail=%llu", rdmacg_resource_names[i], - rpool ? READ_ONCE(rpool->events_max[i]) : 0ULL, + rpool ? rpool->events_max[i] : 0ULL, rdmacg_resource_names[i], - rpool ? READ_ONCE(rpool->events_alloc_fail[i]) : 0ULL); + rpool ? rpool->events_alloc_fail[i] : 0ULL); if (i < RDMACG_RESOURCE_MAX - 1) seq_putc(sf, ' '); } @@ -683,9 +683,9 @@ static int rdmacg_events_local_show(struct seq_file *sf, void *v) for (i = 0; i < RDMACG_RESOURCE_MAX; i++) { seq_printf(sf, "%s.max=%llu %s.alloc_fail=%llu", rdmacg_resource_names[i], - rpool ? READ_ONCE(rpool->events_local_max[i]) : 0ULL, + rpool ? rpool->events_local_max[i] : 0ULL, rdmacg_resource_names[i], - rpool ? READ_ONCE(rpool->events_local_alloc_fail[i]) : 0ULL); + rpool ? rpool->events_local_alloc_fail[i] : 0ULL); if (i < RDMACG_RESOURCE_MAX - 1) seq_putc(sf, ' '); } |
