consolidate.2019.04.09a: Lingering RCU flavor consolidation cleanups. doc.2019.03.26b: Documentation updates. fixes.2019.03.26b: Miscellaneous fixes. srcu.2019.03.26b: SRCU updates. stall.2019.03.26b: RCU CPU stall warning updates. torture.2019.03.26b: Torture-test updates.
6cdbc076 parents bee58fe 884b429 add0d37 f5ad399 6c70e9c 164a4da51 files · +1081 −1272Browse filesShowing the changes to include/linux (2 of 51 files). Show all
Unified · Split
| @@ -878,9 +878,11 @@ static inline void rcu_head_init(struct rcu_head *rhp) · 877 unmodified lines | ||
| 878 | 878 | static inline bool |
| 879 | 879 | rcu_head_after_call_rcu(struct rcu_head *rhp, rcu_callback_t f) |
| 880 | 880 | { |
| 881 | − if (READ_ONCE(rhp->func) == f) | |
| 881 | + rcu_callback_t func = READ_ONCE(rhp->func); | |
| 882 | + | |
| 883 | + if (func == f) | |
| 882 | 884 | return true; |
| 883 | − WARN_ON_ONCE(READ_ONCE(rhp->func) != (rcu_callback_t)~0L); | |
| 885 | + WARN_ON_ONCE(func != (rcu_callback_t)~0L); | |
| 884 | 886 | return false; |
| 885 | 887 | } |
| 886 | 888 | |
| @@ -56,45 +56,11 @@ struct srcu_struct { }; · 55 unmodified lines | ||
| 56 | 56 | |
| 57 | 57 | void call_srcu(struct srcu_struct *ssp, struct rcu_head *head, |
| 58 | 58 | void (*func)(struct rcu_head *head)); |
| 59 | −void _cleanup_srcu_struct(struct srcu_struct *ssp, bool quiesced); | |
| 59 | +void cleanup_srcu_struct(struct srcu_struct *ssp); | |
| 60 | 60 | int __srcu_read_lock(struct srcu_struct *ssp) __acquires(ssp); |
| 61 | 61 | void __srcu_read_unlock(struct srcu_struct *ssp, int idx) __releases(ssp); |
| 62 | 62 | void synchronize_srcu(struct srcu_struct *ssp); |
| 63 | 63 | |
| 64 | −/** | |
| 65 | − * cleanup_srcu_struct - deconstruct a sleep-RCU structure | |
| 66 | − * @ssp: structure to clean up. | |
| 67 | − * | |
| 68 | − * Must invoke this after you are finished using a given srcu_struct that | |
| 69 | − * was initialized via init_srcu_struct(), else you leak memory. | |
| 70 | − */ | |
| 71 | −static inline void cleanup_srcu_struct(struct srcu_struct *ssp) | |
| 72 | −{ | |
| 73 | − _cleanup_srcu_struct(ssp, false); | |
| 74 | −} | |
| 75 | − | |
| 76 | −/** | |
| 77 | − * cleanup_srcu_struct_quiesced - deconstruct a quiesced sleep-RCU structure | |
| 78 | − * @ssp: structure to clean up. | |
| 79 | − * | |
| 80 | − * Must invoke this after you are finished using a given srcu_struct that | |
| 81 | − * was initialized via init_srcu_struct(), else you leak memory. Also, | |
| 82 | − * all grace-period processing must have completed. | |
| 83 | − * | |
| 84 | − * "Completed" means that the last synchronize_srcu() and | |
| 85 | − * synchronize_srcu_expedited() calls must have returned before the call | |
| 86 | − * to cleanup_srcu_struct_quiesced(). It also means that the callback | |
| 87 | − * from the last call_srcu() must have been invoked before the call to | |
| 88 | − * cleanup_srcu_struct_quiesced(), but you can use srcu_barrier() to help | |
| 89 | − * with this last. Violating these rules will get you a WARN_ON() splat | |
| 90 | − * (with high probability, anyway), and will also cause the srcu_struct | |
| 91 | − * to be leaked. | |
| 92 | − */ | |
| 93 | −static inline void cleanup_srcu_struct_quiesced(struct srcu_struct *ssp) | |
| 94 | −{ | |
| 95 | − _cleanup_srcu_struct(ssp, true); | |
| 96 | −} | |
| 97 | − | |
| 98 | 64 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
| 99 | 65 | |
| 100 | 66 | /** |