diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 1d37a8086bed..808cbc2ec6c1 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1630,16 +1630,14 @@ static inline void sk_filter_release(struct sk_filter *fp) | |||
1630 | 1630 | ||
1631 | static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) | 1631 | static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) |
1632 | { | 1632 | { |
1633 | unsigned int size = sk_filter_len(fp); | 1633 | atomic_sub(sk_filter_size(fp->len), &sk->sk_omem_alloc); |
1634 | |||
1635 | atomic_sub(size, &sk->sk_omem_alloc); | ||
1636 | sk_filter_release(fp); | 1634 | sk_filter_release(fp); |
1637 | } | 1635 | } |
1638 | 1636 | ||
1639 | static inline void sk_filter_charge(struct sock *sk, struct sk_filter *fp) | 1637 | static inline void sk_filter_charge(struct sock *sk, struct sk_filter *fp) |
1640 | { | 1638 | { |
1641 | atomic_inc(&fp->refcnt); | 1639 | atomic_inc(&fp->refcnt); |
1642 | atomic_add(sk_filter_len(fp), &sk->sk_omem_alloc); | 1640 | atomic_add(sk_filter_size(fp->len), &sk->sk_omem_alloc); |
1643 | } | 1641 | } |
1644 | 1642 | ||
1645 | /* | 1643 | /* |