+ const bool ref = urcu_ref_get_unless_zero(&trace->ref);
+
+ if (!ref) {
+ /*
+ * The ref count is already zero. It means the object is being
+ * torn down concurently.
+ * This is only acceptable if we hold the RCU read-side lock,
+ * else it's a logic error.
+ */
+ ASSERT_RCU_READ_LOCKED();
+ }
+
+ return ref;