Commit 037d5e9d authored by David S. Miller's avatar David S. Miller

[XFRM]: Fix typos in xfrm_state_put() changes.

parent a4e17696
...@@ -336,7 +336,7 @@ extern struct xfrm_policy *xfrm_policy_list[XFRM_POLICY_MAX*2]; ...@@ -336,7 +336,7 @@ extern struct xfrm_policy *xfrm_policy_list[XFRM_POLICY_MAX*2];
static inline void xfrm_pol_hold(struct xfrm_policy *policy) static inline void xfrm_pol_hold(struct xfrm_policy *policy)
{ {
if (likely(policy)) if (likely(policy != NULL))
atomic_inc(&policy->refcnt); atomic_inc(&policy->refcnt);
} }
......
...@@ -144,7 +144,7 @@ static void xfrm_timer_handler(unsigned long data) ...@@ -144,7 +144,7 @@ static void xfrm_timer_handler(unsigned long data)
resched: resched:
if (next != LONG_MAX && if (next != LONG_MAX &&
!mod_timer(&x->timer, jiffies + make_jiffies(next))) !mod_timer(&x->timer, jiffies + make_jiffies(next)))
xfrm_state_hold(x) xfrm_state_hold(x);
goto out; goto out;
expired: expired:
...@@ -249,7 +249,7 @@ void xfrm_state_flush(u8 proto) ...@@ -249,7 +249,7 @@ void xfrm_state_flush(u8 proto)
restart: restart:
list_for_each_entry(x, xfrm_state_bydst+i, bydst) { list_for_each_entry(x, xfrm_state_bydst+i, bydst) {
if (proto == IPSEC_PROTO_ANY || x->id.proto == proto) { if (proto == IPSEC_PROTO_ANY || x->id.proto == proto) {
xfrm_state_hold(x) xfrm_state_hold(x);
spin_unlock_bh(&xfrm_state_lock); spin_unlock_bh(&xfrm_state_lock);
xfrm_state_delete(x); xfrm_state_delete(x);
...@@ -344,14 +344,14 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr, ...@@ -344,14 +344,14 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
if (km_query(x, tmpl, pol) == 0) { if (km_query(x, tmpl, pol) == 0) {
x->km.state = XFRM_STATE_ACQ; x->km.state = XFRM_STATE_ACQ;
list_add_tail(&x->bydst, xfrm_state_bydst+h); list_add_tail(&x->bydst, xfrm_state_bydst+h);
xfrm_state_hold(x) xfrm_state_hold(x);
if (x->id.spi) { if (x->id.spi) {
h = xfrm_spi_hash(&x->id.daddr, x->id.spi, x->id.proto, family); h = xfrm_spi_hash(&x->id.daddr, x->id.spi, x->id.proto, family);
list_add(&x->byspi, xfrm_state_byspi+h); list_add(&x->byspi, xfrm_state_byspi+h);
xfrm_state_hold(x) xfrm_state_hold(x);
} }
x->lft.hard_add_expires_seconds = XFRM_ACQ_EXPIRES; x->lft.hard_add_expires_seconds = XFRM_ACQ_EXPIRES;
xfrm_state_hold(x) xfrm_state_hold(x);
mod_timer(&x->timer, XFRM_ACQ_EXPIRES*HZ); mod_timer(&x->timer, XFRM_ACQ_EXPIRES*HZ);
} else { } else {
x->km.state = XFRM_STATE_DEAD; x->km.state = XFRM_STATE_DEAD;
...@@ -373,15 +373,15 @@ void xfrm_state_insert(struct xfrm_state *x) ...@@ -373,15 +373,15 @@ void xfrm_state_insert(struct xfrm_state *x)
spin_lock_bh(&xfrm_state_lock); spin_lock_bh(&xfrm_state_lock);
list_add(&x->bydst, xfrm_state_bydst+h); list_add(&x->bydst, xfrm_state_bydst+h);
xfrm_state_hold(x) xfrm_state_hold(x);
h = xfrm_spi_hash(&x->id.daddr, x->id.spi, x->id.proto, x->props.family); h = xfrm_spi_hash(&x->id.daddr, x->id.spi, x->id.proto, x->props.family);
list_add(&x->byspi, xfrm_state_byspi+h); list_add(&x->byspi, xfrm_state_byspi+h);
xfrm_state_hold(x) xfrm_state_hold(x);
if (!mod_timer(&x->timer, jiffies + HZ)) if (!mod_timer(&x->timer, jiffies + HZ))
xfrm_state_hold(x) xfrm_state_hold(x);
spin_unlock_bh(&xfrm_state_lock); spin_unlock_bh(&xfrm_state_lock);
wake_up(&km_waitq); wake_up(&km_waitq);
...@@ -399,7 +399,7 @@ int xfrm_state_check_expire(struct xfrm_state *x) ...@@ -399,7 +399,7 @@ int xfrm_state_check_expire(struct xfrm_state *x)
x->curlft.packets >= x->lft.hard_packet_limit) { x->curlft.packets >= x->lft.hard_packet_limit) {
km_expired(x); km_expired(x);
if (!mod_timer(&x->timer, jiffies + XFRM_ACQ_EXPIRES*HZ)) if (!mod_timer(&x->timer, jiffies + XFRM_ACQ_EXPIRES*HZ))
xfrm_state_hold(x) xfrm_state_hold(x);
return -EINVAL; return -EINVAL;
} }
...@@ -466,7 +466,7 @@ struct xfrm_state * xfrm_find_acq_byseq(u32 seq) ...@@ -466,7 +466,7 @@ struct xfrm_state * xfrm_find_acq_byseq(u32 seq)
for (i = 0; i < XFRM_DST_HSIZE; i++) { for (i = 0; i < XFRM_DST_HSIZE; i++) {
list_for_each_entry(x, xfrm_state_bydst+i, bydst) { list_for_each_entry(x, xfrm_state_bydst+i, bydst) {
if (x->km.seq == seq) { if (x->km.seq == seq) {
xfrm_state_hold(x) xfrm_state_hold(x);
spin_unlock_bh(&xfrm_state_lock); spin_unlock_bh(&xfrm_state_lock);
return x; return x;
} }
...@@ -521,7 +521,7 @@ xfrm_alloc_spi(struct xfrm_state *x, u32 minspi, u32 maxspi) ...@@ -521,7 +521,7 @@ xfrm_alloc_spi(struct xfrm_state *x, u32 minspi, u32 maxspi)
spin_lock_bh(&xfrm_state_lock); spin_lock_bh(&xfrm_state_lock);
h = xfrm_spi_hash(&x->id.daddr, x->id.spi, x->id.proto, x->props.family); h = xfrm_spi_hash(&x->id.daddr, x->id.spi, x->id.proto, x->props.family);
list_add(&x->byspi, xfrm_state_byspi+h); list_add(&x->byspi, xfrm_state_byspi+h);
xfrm_state_hold(x) xfrm_state_hold(x);
spin_unlock_bh(&xfrm_state_lock); spin_unlock_bh(&xfrm_state_lock);
wake_up(&km_waitq); wake_up(&km_waitq);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment