diff options
author | Florian Westphal <fw@strlen.de> | 2016-08-11 09:17:58 -0400 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2016-08-12 02:07:12 -0400 |
commit | d5b8f86dc7200d16e48bb3a6aaac29c0cdf621c9 (patch) | |
tree | d772e2fbe91b8609a743207213912818ff946b39 /net/xfrm | |
parent | ae33786f73a7ce5b15ce29e8f342e43606385cef (diff) |
xfrm: policy: don't acquire policy lock in xfrm_spd_getinfo
It doesn't seem that important.
We now get inconsistent view of the counters, but those are stale anyway
right after we drop the lock.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 3d27b9a2fbac..35b85a9a358c 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -560,7 +560,6 @@ static inline int xfrm_byidx_should_resize(struct net *net, int total) | |||
560 | 560 | ||
561 | void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si) | 561 | void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si) |
562 | { | 562 | { |
563 | read_lock_bh(&net->xfrm.xfrm_policy_lock); | ||
564 | si->incnt = net->xfrm.policy_count[XFRM_POLICY_IN]; | 563 | si->incnt = net->xfrm.policy_count[XFRM_POLICY_IN]; |
565 | si->outcnt = net->xfrm.policy_count[XFRM_POLICY_OUT]; | 564 | si->outcnt = net->xfrm.policy_count[XFRM_POLICY_OUT]; |
566 | si->fwdcnt = net->xfrm.policy_count[XFRM_POLICY_FWD]; | 565 | si->fwdcnt = net->xfrm.policy_count[XFRM_POLICY_FWD]; |
@@ -569,7 +568,6 @@ void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si) | |||
569 | si->fwdscnt = net->xfrm.policy_count[XFRM_POLICY_FWD+XFRM_POLICY_MAX]; | 568 | si->fwdscnt = net->xfrm.policy_count[XFRM_POLICY_FWD+XFRM_POLICY_MAX]; |
570 | si->spdhcnt = net->xfrm.policy_idx_hmask; | 569 | si->spdhcnt = net->xfrm.policy_idx_hmask; |
571 | si->spdhmcnt = xfrm_policy_hashmax; | 570 | si->spdhmcnt = xfrm_policy_hashmax; |
572 | read_unlock_bh(&net->xfrm.xfrm_policy_lock); | ||
573 | } | 571 | } |
574 | EXPORT_SYMBOL(xfrm_spd_getinfo); | 572 | EXPORT_SYMBOL(xfrm_spd_getinfo); |
575 | 573 | ||