diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-20 15:51:24 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-20 15:51:24 +0100 |
commit | df5179854bca84ac5be500849b12dd33ce03f03f (patch) | |
tree | 78cf16415489e70f34c58f2c7f5c2e63696e9761 /net/xfrm/xfrm_policy.c | |
parent | 0f45aa18e65cf3d768082d7d86054a0d2a20bb18 (diff) | |
parent | 8b22c249e7de453961e4d253b19fc2a0bdd65d53 (diff) | |
download | blackbird-op-linux-df5179854bca84ac5be500849b12dd33ce03f03f.tar.gz blackbird-op-linux-df5179854bca84ac5be500849b12dd33ce03f03f.zip |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index d07f5ce31824..0a4260719a12 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -216,8 +216,8 @@ out: expired: read_unlock(&xp->lock); - km_policy_expired(xp, dir, 1); - xfrm_policy_delete(xp, dir); + if (!xfrm_policy_delete(xp, dir)) + km_policy_expired(xp, dir, 1); xfrm_pol_put(xp); } @@ -555,7 +555,7 @@ static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol, return NULL; } -void xfrm_policy_delete(struct xfrm_policy *pol, int dir) +int xfrm_policy_delete(struct xfrm_policy *pol, int dir) { write_lock_bh(&xfrm_policy_lock); pol = __xfrm_policy_unlink(pol, dir); @@ -564,7 +564,9 @@ void xfrm_policy_delete(struct xfrm_policy *pol, int dir) if (dir < XFRM_POLICY_MAX) atomic_inc(&flow_cache_genid); xfrm_policy_kill(pol); + return 0; } + return -ENOENT; } int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol) |