diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-17 21:21:51 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-10-17 21:21:51 -0700 |
commit | 309dd5fc872448e35634d510049642312ebc170d (patch) | |
tree | 5284d7b48980482ecba06b760ac16d9f94e66ea9 /net/core/filter.c | |
parent | 55b333253d5bcafbe187b50474e40789301c53c6 (diff) | |
download | linux-309dd5fc872448e35634d510049642312ebc170d.tar.bz2 |
[NET]: Move the filter releasing into a separate call
This is done merely as a preparation for the fix.
The sk_filter_uncharge() unaccounts the filter memory and calls
the sk_filter_release(), which in turn decrements the refcount
anf frees the filter.
The latter function will be required separately.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/filter.c')
-rw-r--r-- | net/core/filter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index fd607581ab50..2be1830d3c35 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -429,7 +429,7 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk) } if (fp) - sk_filter_release(sk, fp); + sk_filter_uncharge(sk, fp); return err; } @@ -442,7 +442,7 @@ int sk_detach_filter(struct sock *sk) filter = rcu_dereference(sk->sk_filter); if (filter) { rcu_assign_pointer(sk->sk_filter, NULL); - sk_filter_release(sk, filter); + sk_filter_uncharge(sk, filter); ret = 0; } rcu_read_unlock_bh(); |