->bydst, ->bysrc, and ->byspi are counted as a single external
reference because:
1) They are controlled as a group
2) Doing 3 atomic operations is more expensive than one
I know because I did that conversion from 3 refcount operations down
to 1 and I timed it with stress tests, which showed that it made a
huge performance difference for the control path of our IPSEC stack.
Once there are no list references, there cannot be any other references.
So in fact it seems to me that unlinking when the xfrm_state is removed
from those other lists makes perfect sense.
If __xfrm_state_delete sets the state to DEAD, and you skip xfrm_state
objects marked DEAD, why does the ->all list reference have to survive
past __xfrm_state_delete()?
It seems the perfect place to do the ->all removal.
At least the old stuff was self-consistent and only needed one central
lock grab to destoy an object.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html