aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 8d7c431a0660..06a5668f05c9 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1621,33 +1621,6 @@ void sk_common_release(struct sock *sk);
1621/* Initialise core socket variables */ 1621/* Initialise core socket variables */
1622void sock_init_data(struct socket *sock, struct sock *sk); 1622void sock_init_data(struct socket *sock, struct sock *sk);
1623 1623
1624void sk_filter_release_rcu(struct rcu_head *rcu);
1625
1626/**
1627 * sk_filter_release - release a socket filter
1628 * @fp: filter to remove
1629 *
1630 * Remove a filter from a socket and release its resources.
1631 */
1632
1633static inline void sk_filter_release(struct sk_filter *fp)
1634{
1635 if (atomic_dec_and_test(&fp->refcnt))
1636 call_rcu(&fp->rcu, sk_filter_release_rcu);
1637}
1638
1639static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp)
1640{
1641 atomic_sub(sk_filter_size(fp->len), &sk->sk_omem_alloc);
1642 sk_filter_release(fp);
1643}
1644
1645static inline void sk_filter_charge(struct sock *sk, struct sk_filter *fp)
1646{
1647 atomic_inc(&fp->refcnt);
1648 atomic_add(sk_filter_size(fp->len), &sk->sk_omem_alloc);
1649}
1650
1651/* 1624/*
1652 * Socket reference counting postulates. 1625 * Socket reference counting postulates.
1653 * 1626 *