Commit 468ec44b authored by Yasuyuki Kozakai's avatar Yasuyuki Kozakai Committed by David S. Miller

[NETFILTER]: conntrack: add '_get' to {ip, nf}_conntrack_expect_find

We usually uses 'xxx_find_get' for function which increments
reference count.
Signed-off-by: default avatarYasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent e4bd8bce
...@@ -277,7 +277,7 @@ extern struct ip_conntrack_expect * ...@@ -277,7 +277,7 @@ extern struct ip_conntrack_expect *
__ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple); __ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple);
extern struct ip_conntrack_expect * extern struct ip_conntrack_expect *
ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple); ip_conntrack_expect_find_get(const struct ip_conntrack_tuple *tuple);
extern struct ip_conntrack_tuple_hash * extern struct ip_conntrack_tuple_hash *
__ip_conntrack_find(const struct ip_conntrack_tuple *tuple, __ip_conntrack_find(const struct ip_conntrack_tuple *tuple,
......
...@@ -53,7 +53,7 @@ struct nf_conntrack_expect * ...@@ -53,7 +53,7 @@ struct nf_conntrack_expect *
__nf_conntrack_expect_find(const struct nf_conntrack_tuple *tuple); __nf_conntrack_expect_find(const struct nf_conntrack_tuple *tuple);
struct nf_conntrack_expect * struct nf_conntrack_expect *
nf_conntrack_expect_find(const struct nf_conntrack_tuple *tuple); nf_conntrack_expect_find_get(const struct nf_conntrack_tuple *tuple);
struct nf_conntrack_expect * struct nf_conntrack_expect *
find_expectation(const struct nf_conntrack_tuple *tuple); find_expectation(const struct nf_conntrack_tuple *tuple);
......
...@@ -233,7 +233,7 @@ __ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple) ...@@ -233,7 +233,7 @@ __ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple)
/* Just find a expectation corresponding to a tuple. */ /* Just find a expectation corresponding to a tuple. */
struct ip_conntrack_expect * struct ip_conntrack_expect *
ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple) ip_conntrack_expect_find_get(const struct ip_conntrack_tuple *tuple)
{ {
struct ip_conntrack_expect *i; struct ip_conntrack_expect *i;
......
...@@ -142,7 +142,7 @@ static void pptp_expectfn(struct ip_conntrack *ct, ...@@ -142,7 +142,7 @@ static void pptp_expectfn(struct ip_conntrack *ct,
DEBUGP("trying to unexpect other dir: "); DEBUGP("trying to unexpect other dir: ");
DUMP_TUPLE(&inv_t); DUMP_TUPLE(&inv_t);
exp_other = ip_conntrack_expect_find(&inv_t); exp_other = ip_conntrack_expect_find_get(&inv_t);
if (exp_other) { if (exp_other) {
/* delete other expectation. */ /* delete other expectation. */
DEBUGP("found\n"); DEBUGP("found\n");
...@@ -176,7 +176,7 @@ static int destroy_sibling_or_exp(const struct ip_conntrack_tuple *t) ...@@ -176,7 +176,7 @@ static int destroy_sibling_or_exp(const struct ip_conntrack_tuple *t)
ip_conntrack_put(sibling); ip_conntrack_put(sibling);
return 1; return 1;
} else { } else {
exp = ip_conntrack_expect_find(t); exp = ip_conntrack_expect_find_get(t);
if (exp) { if (exp) {
DEBUGP("unexpect_related of expect %p\n", exp); DEBUGP("unexpect_related of expect %p\n", exp);
ip_conntrack_unexpect_related(exp); ip_conntrack_unexpect_related(exp);
......
...@@ -1256,7 +1256,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb, ...@@ -1256,7 +1256,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb,
if (err < 0) if (err < 0)
return err; return err;
exp = ip_conntrack_expect_find(&tuple); exp = ip_conntrack_expect_find_get(&tuple);
if (!exp) if (!exp)
return -ENOENT; return -ENOENT;
...@@ -1309,7 +1309,7 @@ ctnetlink_del_expect(struct sock *ctnl, struct sk_buff *skb, ...@@ -1309,7 +1309,7 @@ ctnetlink_del_expect(struct sock *ctnl, struct sk_buff *skb,
return err; return err;
/* bump usage count to 2 */ /* bump usage count to 2 */
exp = ip_conntrack_expect_find(&tuple); exp = ip_conntrack_expect_find_get(&tuple);
if (!exp) if (!exp)
return -ENOENT; return -ENOENT;
......
...@@ -926,7 +926,7 @@ EXPORT_SYMBOL(__ip_ct_refresh_acct); ...@@ -926,7 +926,7 @@ EXPORT_SYMBOL(__ip_ct_refresh_acct);
EXPORT_SYMBOL(ip_conntrack_expect_alloc); EXPORT_SYMBOL(ip_conntrack_expect_alloc);
EXPORT_SYMBOL(ip_conntrack_expect_put); EXPORT_SYMBOL(ip_conntrack_expect_put);
EXPORT_SYMBOL_GPL(__ip_conntrack_expect_find); EXPORT_SYMBOL_GPL(__ip_conntrack_expect_find);
EXPORT_SYMBOL_GPL(ip_conntrack_expect_find); EXPORT_SYMBOL_GPL(ip_conntrack_expect_find_get);
EXPORT_SYMBOL(ip_conntrack_expect_related); EXPORT_SYMBOL(ip_conntrack_expect_related);
EXPORT_SYMBOL(ip_conntrack_unexpect_related); EXPORT_SYMBOL(ip_conntrack_unexpect_related);
EXPORT_SYMBOL_GPL(ip_conntrack_expect_list); EXPORT_SYMBOL_GPL(ip_conntrack_expect_list);
......
...@@ -101,7 +101,7 @@ static void pptp_nat_expected(struct ip_conntrack *ct, ...@@ -101,7 +101,7 @@ static void pptp_nat_expected(struct ip_conntrack *ct,
DEBUGP("trying to unexpect other dir: "); DEBUGP("trying to unexpect other dir: ");
DUMP_TUPLE(&t); DUMP_TUPLE(&t);
other_exp = ip_conntrack_expect_find(&t); other_exp = ip_conntrack_expect_find_get(&t);
if (other_exp) { if (other_exp) {
ip_conntrack_unexpect_related(other_exp); ip_conntrack_unexpect_related(other_exp);
ip_conntrack_expect_put(other_exp); ip_conntrack_expect_put(other_exp);
......
...@@ -68,7 +68,7 @@ __nf_conntrack_expect_find(const struct nf_conntrack_tuple *tuple) ...@@ -68,7 +68,7 @@ __nf_conntrack_expect_find(const struct nf_conntrack_tuple *tuple)
/* Just find a expectation corresponding to a tuple. */ /* Just find a expectation corresponding to a tuple. */
struct nf_conntrack_expect * struct nf_conntrack_expect *
nf_conntrack_expect_find(const struct nf_conntrack_tuple *tuple) nf_conntrack_expect_find_get(const struct nf_conntrack_tuple *tuple)
{ {
struct nf_conntrack_expect *i; struct nf_conntrack_expect *i;
......
...@@ -1284,7 +1284,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb, ...@@ -1284,7 +1284,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb,
if (err < 0) if (err < 0)
return err; return err;
exp = nf_conntrack_expect_find(&tuple); exp = nf_conntrack_expect_find_get(&tuple);
if (!exp) if (!exp)
return -ENOENT; return -ENOENT;
...@@ -1339,7 +1339,7 @@ ctnetlink_del_expect(struct sock *ctnl, struct sk_buff *skb, ...@@ -1339,7 +1339,7 @@ ctnetlink_del_expect(struct sock *ctnl, struct sk_buff *skb,
return err; return err;
/* bump usage count to 2 */ /* bump usage count to 2 */
exp = nf_conntrack_expect_find(&tuple); exp = nf_conntrack_expect_find_get(&tuple);
if (!exp) if (!exp)
return -ENOENT; return -ENOENT;
......
...@@ -549,7 +549,7 @@ EXPORT_SYMBOL(__nf_conntrack_find); ...@@ -549,7 +549,7 @@ EXPORT_SYMBOL(__nf_conntrack_find);
EXPORT_SYMBOL(nf_ct_unlink_expect); EXPORT_SYMBOL(nf_ct_unlink_expect);
EXPORT_SYMBOL(nf_conntrack_hash_insert); EXPORT_SYMBOL(nf_conntrack_hash_insert);
EXPORT_SYMBOL(__nf_conntrack_expect_find); EXPORT_SYMBOL(__nf_conntrack_expect_find);
EXPORT_SYMBOL(nf_conntrack_expect_find); EXPORT_SYMBOL(nf_conntrack_expect_find_get);
EXPORT_SYMBOL(nf_conntrack_expect_list); EXPORT_SYMBOL(nf_conntrack_expect_list);
#if defined(CONFIG_NF_CT_NETLINK) || \ #if defined(CONFIG_NF_CT_NETLINK) || \
defined(CONFIG_NF_CT_NETLINK_MODULE) defined(CONFIG_NF_CT_NETLINK_MODULE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment