int warn = 0;
int dir;
+ read_lock(&xp->lock);
+
if (xp->dead)
goto out;
xfrm_pol_hold(xp);
out:
+ read_unlock(&xp->lock);
xfrm_pol_put(xp);
return;
static void xfrm_dst_destroy(struct dst_entry *dst)
{
+ if (!dst->xfrm)
+ return;
xfrm_state_put(dst->xfrm);
dst->xfrm = NULL;
}