]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blobdiff - kernel/rcu/sync.c
locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write()
[hercules2020/nv-tegra/linux-4.4.git] / kernel / rcu / sync.c
index 198473d90f81d055baecf10f10f5cfe96b308bf9..50d1861f7759b40ff0248281e742a6a4fac1e852 100644 (file)
@@ -84,6 +84,18 @@ void rcu_sync_init(struct rcu_sync *rsp, enum rcu_sync_type type)
        rsp->gp_type = type;
 }
 
+/**
+ * Must be called after rcu_sync_init() and before first use.
+ *
+ * Ensures rcu_sync_is_idle() returns false and rcu_sync_{enter,exit}()
+ * pairs turn into NO-OPs.
+ */
+void rcu_sync_enter_start(struct rcu_sync *rsp)
+{
+       rsp->gp_count++;
+       rsp->gp_state = GP_PASSED;
+}
+
 /**
  * rcu_sync_enter() - Force readers onto slowpath
  * @rsp: Pointer to rcu_sync structure to use for synchronization