|
@@ -357,7 +357,7 @@ EXPORT_SYMBOL_GPL(cleanup_srcu_struct);
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
* Counts the new reader in the appropriate per-CPU element of the
|
|
* Counts the new reader in the appropriate per-CPU element of the
|
|
|
- * srcu_struct. Must be called from process context.
|
|
|
|
|
|
|
+ * srcu_struct.
|
|
|
* Returns an index that must be passed to the matching srcu_read_unlock().
|
|
* Returns an index that must be passed to the matching srcu_read_unlock().
|
|
|
*/
|
|
*/
|
|
|
int __srcu_read_lock(struct srcu_struct *sp)
|
|
int __srcu_read_lock(struct srcu_struct *sp)
|
|
@@ -365,7 +365,7 @@ int __srcu_read_lock(struct srcu_struct *sp)
|
|
|
int idx;
|
|
int idx;
|
|
|
|
|
|
|
|
idx = READ_ONCE(sp->srcu_idx) & 0x1;
|
|
idx = READ_ONCE(sp->srcu_idx) & 0x1;
|
|
|
- __this_cpu_inc(sp->sda->srcu_lock_count[idx]);
|
|
|
|
|
|
|
+ this_cpu_inc(sp->sda->srcu_lock_count[idx]);
|
|
|
smp_mb(); /* B */ /* Avoid leaking the critical section. */
|
|
smp_mb(); /* B */ /* Avoid leaking the critical section. */
|
|
|
return idx;
|
|
return idx;
|
|
|
}
|
|
}
|
|
@@ -375,7 +375,6 @@ EXPORT_SYMBOL_GPL(__srcu_read_lock);
|
|
|
* Removes the count for the old reader from the appropriate per-CPU
|
|
* Removes the count for the old reader from the appropriate per-CPU
|
|
|
* element of the srcu_struct. Note that this may well be a different
|
|
* element of the srcu_struct. Note that this may well be a different
|
|
|
* CPU than that which was incremented by the corresponding srcu_read_lock().
|
|
* CPU than that which was incremented by the corresponding srcu_read_lock().
|
|
|
- * Must be called from process context.
|
|
|
|
|
*/
|
|
*/
|
|
|
void __srcu_read_unlock(struct srcu_struct *sp, int idx)
|
|
void __srcu_read_unlock(struct srcu_struct *sp, int idx)
|
|
|
{
|
|
{
|