+ if (!rtnl)
+ return NULL;
+
+ /*
+ * If our ref-cnt is exactly the number of internally queued messages
+ * plus the ref-cnt to be dropped, then we know there's no external
+ * reference to us. Hence, we look through all queued messages and if
+ * they also have no external references, we're about to drop the last
+ * ref. Flush the queues so the REFCNT_DEC() below will drop to 0.
+ * We must be careful not to introduce inter-message references or this
+ * logic will fall apart..
+ */
+
+ refs = rtnl->rqueue_size + rtnl->wqueue_size + 1;
+
+ if (REFCNT_GET(rtnl->n_ref) <= refs) {