aboutsummaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2015-01-29 01:16:23 +0530
committerAmit Pundir <amit.pundir@linaro.org>2015-03-24 22:04:09 +0530
commit018490dccdec02158434d25a53cdc96a6c99607e (patch)
tree0a6ce6e3bc73e9fd133a00f92aee176dbbf0560f /net/netfilter
parent1958359f69041601e661b0edef7467ff55300642 (diff)
xt_qtaguid: use sock_gen_put() instead of xt_socket_put_sk()
Removing obsolete xt_socket_put_sk() and using sock_gen_put() instead. xt_socket_put_sk() was reintroduced for xt_qtaguid in one of the patches, but it turned out sock_gen_put() supersedes xt_socket_put_sk(). So we don't need xt_socket_put_sk() any more. This patch is based on commit 1a8bf6eeef9f (netfilter: xt_socket: use sock_gen_put()) Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Change-Id: I976d5f7f7eded0f3cc91b596acfeb35e4c2057e5 (cherry picked from commit 551780fc28cb7480dbc4f585ef80ca02c2922ec1)
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 e33be3aaf094..2f9784c1e692 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;
}
}
@@ -1803,7 +1803,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);
if (set_sk_callback_lock)
read_unlock_bh(&sk->sk_callback_lock);
ret_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,