Commit 62bb24c
rcu: Remove redundant READ_ONCE() of rcu_state.gp_flags in tree.c
Although it is functionally OK to do READ_ONCE() of a variable that
cannot change, it is confusing and at best an accident waiting to happen.
This commit therefore removes a number of READ_ONCE(rcu_state.gp_flags)
instances from kernel/rcu/tree.c that are not needed due to updates
to this field being excluded by virtue of holding the root rcu_node
structure's ->lock.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Closes: https://lore.kernel.org/lkml/4857c5ef-bd8f-4670-87ac-0600a1699d05@paulmck-laptop/T/#mccb23c2a4902da4d3c750165329f8de056903c58
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Closes: https://lore.kernel.org/lkml/4857c5ef-bd8f-4670-87ac-0600a1699d05@paulmck-laptop/T/#md1b5c026584f9c3c7b0fbc9240dd7de584597b73
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>1 parent 11b8b37 commit 62bb24c
1 file changed
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1463 | 1463 | | |
1464 | 1464 | | |
1465 | 1465 | | |
1466 | | - | |
| 1466 | + | |
1467 | 1467 | | |
1468 | 1468 | | |
1469 | 1469 | | |
| |||
1648 | 1648 | | |
1649 | 1649 | | |
1650 | 1650 | | |
1651 | | - | |
1652 | | - | |
| 1651 | + | |
1653 | 1652 | | |
1654 | 1653 | | |
1655 | 1654 | | |
| |||
1910 | 1909 | | |
1911 | 1910 | | |
1912 | 1911 | | |
1913 | | - | |
1914 | | - | |
| 1912 | + | |
1915 | 1913 | | |
1916 | 1914 | | |
1917 | 1915 | | |
| |||
2426 | 2424 | | |
2427 | 2425 | | |
2428 | 2426 | | |
2429 | | - | |
2430 | | - | |
| 2427 | + | |
2431 | 2428 | | |
2432 | 2429 | | |
2433 | 2430 | | |
| |||
0 commit comments