diff options
author | Kinsey Ho <[email protected]> | 2024-09-05 00:30:51 +0000 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-09-09 16:39:16 -0700 |
commit | 4a2698b0133b5c477515ccbedff169fec722d0e7 (patch) | |
tree | 4ae934f349450625b27ad34a5f14a75c8bbe8822 /lib/crypto/mpi/mpiutil.c | |
parent | 0e40cf2a8b2c847950e025d5aa594bd545118d26 (diff) |
mm: don't hold css->refcnt during traversal
To obtain the pointer to the next memcg position, mem_cgroup_iter()
currently holds css->refcnt during memcg traversal only to put css->refcnt
at the end of the routine. This isn't necessary as an rcu_read_lock is
already held throughout the function. The use of the RCU read lock with
css_next_descendant_pre() guarantees that sibling linkage is safe without
holding a ref on the passed-in @css.
Remove css->refcnt usage during traversal by leveraging RCU.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Kinsey Ho <[email protected]>
Reviewed-by: T.J. Mercier <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Michal Koutný <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Roman Gushchin <[email protected]>
Cc: Shakeel Butt <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Yosry Ahmed <[email protected]>
Cc: Zefan Li <[email protected]>
Cc: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions