aboutsummaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2014-04-15 17:40:02 -0700
committerJohn Stultz <john.stultz@linaro.org>2014-04-15 17:40:02 -0700
commit85dbc0b1fea00b25185d4ac9969976a4a0e8d4ff (patch)
tree8e696abd24c3f9d317c44fa9dba310da0cc87556 /net/netfilter
parent0f45fe3b6ee53402eee5d5192d788fb9df966fc1 (diff)
qtaguid: Refactor changes to use sock_gen_put() instead of xt_socket_put_sk()
Michael Scott noticed sock_gen_put() is likely the right thing here instead of reintroducing xt_socket_put_sk(). Reported-by: Michael Scott <hashcode0f@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/xt_qtaguid.c4
-rw-r--r--net/netfilter/xt_socket.c10
2 files changed, 2 insertions, 12 deletions
diff --git a/net/netfilter/xt_qtaguid.c b/net/netfilter/xt_qtaguid.c
index a79b7ae268bb..fcd2d8125954 100644
--- a/net/netfilter/xt_qtaguid.c
+++ b/net/netfilter/xt_qtaguid.c
@@ -1605,7 +1605,7 @@ static struct sock *qtaguid_find_sk(const struct sk_buff *skb,
* "struct inet_timewait_sock" which is missing fields.
*/
if (sk->sk_state == TCP_TIME_WAIT) {
- xt_socket_put_sk(sk);
+ sock_gen_put(sk);
sk = NULL;
}
}
@@ -1800,7 +1800,7 @@ static bool qtaguid_mt(const struct sk_buff *skb, struct xt_action_param *par)
put_sock_ret_res:
if (got_sock)
- xt_socket_put_sk(sk);
+ sock_gen_put(sk);
ret_res:
MT_DEBUG("qtaguid[%d]: left %d\n", par->hooknum, res);
return res;
diff --git a/net/netfilter/xt_socket.c b/net/netfilter/xt_socket.c
index c2d565bdb484..7eb9d7d534d6 100644
--- a/net/netfilter/xt_socket.c
+++ b/net/netfilter/xt_socket.c
@@ -35,16 +35,6 @@
#include <net/netfilter/nf_conntrack.h>
#endif
-void
-xt_socket_put_sk(struct sock *sk)
-{
- if (sk->sk_state == TCP_TIME_WAIT)
- inet_twsk_put(inet_twsk(sk));
- else
- sock_put(sk);
-}
-EXPORT_SYMBOL(xt_socket_put_sk);
-
static int
extract_icmp4_fields(const struct sk_buff *skb,
u8 *protocol,