+ unsigned long was_online;
+
+ was_online = rcu_reader_qs_gp;
+
+ /*
+ * Mark the writer thread offline to make sure we don't wait for
+ * our own quiescent state. This allows using synchronize_rcu() in
+ * threads registered as readers.
+ */
+ smp_mb();
+ if (was_online)
+ STORE_SHARED(rcu_reader_qs_gp, 0);
+