summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-12-16 12:34:49 +0100
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-12-16 12:34:49 +0100
commit5200ad226e7fcbbd069f539c309d17a9e66719af (patch)
tree850b74aad437a4b17ccab1fb1848dedba1e4aab2
parent3080a55074a595acdeb5bc85bbcd8dba9fa1bfc2 (diff)
Remove unnecessary gfp_flags arguments
Where the argument was used, the set lock was already activated, therefore the argument value was always GFP_ATOMIC.
-rw-r--r--kernel/include/linux/netfilter/ipset/ip_set.h5
-rw-r--r--kernel/include/linux/netfilter/ipset/ip_set_ahash.h48
-rw-r--r--kernel/ip_set.c3
-rw-r--r--kernel/ip_set_bitmap_ipmac.c22
-rw-r--r--kernel/ip_set_hash_ip.c10
-rw-r--r--kernel/ip_set_hash_ipport.c8
-rw-r--r--kernel/ip_set_hash_ipportip.c8
-rw-r--r--kernel/ip_set_hash_ipportnet.c8
-rw-r--r--kernel/ip_set_hash_net.c8
-rw-r--r--kernel/ip_set_hash_netport.c8
10 files changed, 58 insertions, 70 deletions
diff --git a/kernel/include/linux/netfilter/ipset/ip_set.h b/kernel/include/linux/netfilter/ipset/ip_set.h
index 1e18b14..df144cc 100644
--- a/kernel/include/linux/netfilter/ipset/ip_set.h
+++ b/kernel/include/linux/netfilter/ipset/ip_set.h
@@ -214,8 +214,7 @@ enum ip_set_feature {
struct ip_set;
-typedef int (*ipset_adtfn)(struct ip_set *set, void *value,
- gfp_t gfp_flags, u32 timeout);
+typedef int (*ipset_adtfn)(struct ip_set *set, void *value, u32 timeout);
/* Set type, variant-specific part */
struct ip_set_type_variant {
@@ -231,7 +230,7 @@ struct ip_set_type_variant {
ipset_adtfn adt[IPSET_ADT_MAX];
/* When adding entries and set is full, try to resize the set */
- int (*resize)(struct ip_set *set, gfp_t gfp_flags, bool retried);
+ int (*resize)(struct ip_set *set, bool retried);
/* Destroy the set */
void (*destroy)(struct ip_set *set);
/* Flush the elements */
diff --git a/kernel/include/linux/netfilter/ipset/ip_set_ahash.h b/kernel/include/linux/netfilter/ipset/ip_set_ahash.h
index 630cd54..85e23b2 100644
--- a/kernel/include/linux/netfilter/ipset/ip_set_ahash.h
+++ b/kernel/include/linux/netfilter/ipset/ip_set_ahash.h
@@ -262,8 +262,7 @@ ip_set_hash_destroy(struct ip_set *set)
/* Add an element to the hash table when resizing the set:
* we spare the maintenance of the internal counters. */
static int
-type_pf_elem_add(struct hbucket *n, const struct type_pf_elem *value,
- gfp_t gfp_flags)
+type_pf_elem_add(struct hbucket *n, const struct type_pf_elem *value)
{
if (n->pos >= n->size) {
void *tmp;
@@ -274,7 +273,7 @@ type_pf_elem_add(struct hbucket *n, const struct type_pf_elem *value,
tmp = kzalloc((n->size + AHASH_INIT_SIZE)
* sizeof(struct type_pf_elem),
- gfp_flags);
+ GFP_ATOMIC);
if (!tmp)
return -ENOMEM;
if (n->size) {
@@ -293,7 +292,7 @@ type_pf_elem_add(struct hbucket *n, const struct type_pf_elem *value,
* and inserting the elements to it. Repeat until we succeed or
* fail due to memory pressures. */
static int
-type_pf_resize(struct ip_set *set, gfp_t gfp_flags, bool retried)
+type_pf_resize(struct ip_set *set, bool retried)
{
struct ip_set_hash *h = set->data;
struct htable *t, *orig = h->table;
@@ -324,7 +323,7 @@ retry:
for (j = 0; j < n->pos; j++) {
data = ahash_data(n, j);
m = hbucket(t, HKEY(data, h->initval, htable_bits));
- ret = type_pf_elem_add(m, data, gfp_flags);
+ ret = type_pf_elem_add(m, data);
if (ret < 0) {
read_unlock_bh(&set->lock);
ahash_destroy(t);
@@ -351,7 +350,7 @@ retry:
/* Add an element to a hash and update the internal counters when succeeded,
* otherwise report the proper error code. */
static int
-type_pf_add(struct ip_set *set, void *value, gfp_t gfp_flags, u32 timeout)
+type_pf_add(struct ip_set *set, void *value, u32 timeout)
{
struct ip_set_hash *h = set->data;
struct htable *t;
@@ -373,7 +372,7 @@ type_pf_add(struct ip_set *set, void *value, gfp_t gfp_flags, u32 timeout)
goto out;
}
- ret = type_pf_elem_add(n, value, gfp_flags);
+ ret = type_pf_elem_add(n, value);
if (ret != 0)
goto out;
@@ -390,7 +389,7 @@ out:
* and free up space if possible.
*/
static int
-type_pf_del(struct ip_set *set, void *value, gfp_t gfp_flags, u32 timeout)
+type_pf_del(struct ip_set *set, void *value, u32 timeout)
{
struct ip_set_hash *h = set->data;
struct htable *t = h->table;
@@ -418,7 +417,7 @@ type_pf_del(struct ip_set *set, void *value, gfp_t gfp_flags, u32 timeout)
if (n->pos + AHASH_INIT_SIZE < n->size) {
void *tmp = kzalloc((n->size - AHASH_INIT_SIZE)
* sizeof(struct type_pf_elem),
- gfp_flags);
+ GFP_ATOMIC);
if (!tmp)
return 0;
n->size -= AHASH_INIT_SIZE;
@@ -438,8 +437,7 @@ type_pf_del(struct ip_set *set, void *value, gfp_t gfp_flags, u32 timeout)
/* Special test function which takes into account the different network
* sizes added to the set */
static inline int
-type_pf_test_cidrs(struct ip_set *set, struct type_pf_elem *d,
- gfp_t gfp_flags, u32 timeout)
+type_pf_test_cidrs(struct ip_set *set, struct type_pf_elem *d, u32 timeout)
{
struct ip_set_hash *h = set->data;
struct htable *t = h->table;
@@ -466,7 +464,7 @@ type_pf_test_cidrs(struct ip_set *set, struct type_pf_elem *d,
/* Test whether the element is added to the set */
static int
-type_pf_test(struct ip_set *set, void *value, gfp_t gfp_flags, u32 timeout)
+type_pf_test(struct ip_set *set, void *value, u32 timeout)
{
struct ip_set_hash *h = set->data;
struct htable *t = h->table;
@@ -480,7 +478,7 @@ type_pf_test(struct ip_set *set, void *value, gfp_t gfp_flags, u32 timeout)
/* If we test an IP address and not a network address,
* try all possible network sizes */
if (d->cidr == SET_HOST_MASK(set->family))
- return type_pf_test_cidrs(set, d, gfp_flags, timeout);
+ return type_pf_test_cidrs(set, d, timeout);
#endif
key = HKEY(d, h->initval, t->htable_bits);
@@ -643,7 +641,7 @@ type_pf_data_timeout_set(struct type_pf_elem *data, u32 timeout)
static int
type_pf_elem_tadd(struct hbucket *n, const struct type_pf_elem *value,
- gfp_t gfp_flags, u32 timeout)
+ u32 timeout)
{
struct type_pf_elem *data;
@@ -656,7 +654,7 @@ type_pf_elem_tadd(struct hbucket *n, const struct type_pf_elem *value,
tmp = kzalloc((n->size + AHASH_INIT_SIZE)
* sizeof(struct type_pf_telem),
- gfp_flags);
+ GFP_ATOMIC);
if (!tmp)
return -ENOMEM;
if (n->size) {
@@ -717,7 +715,7 @@ type_pf_expire(struct ip_set_hash *h)
}
static int
-type_pf_tresize(struct ip_set *set, gfp_t gfp_flags, bool retried)
+type_pf_tresize(struct ip_set *set, bool retried)
{
struct ip_set_hash *h = set->data;
struct htable *t, *orig = h->table;
@@ -756,7 +754,7 @@ retry:
for (j = 0; j < n->pos; j++) {
data = ahash_tdata(n, j);
m = hbucket(t, HKEY(data, h->initval, htable_bits));
- ret = type_pf_elem_tadd(m, data, gfp_flags,
+ ret = type_pf_elem_tadd(m, data,
type_pf_data_timeout(data));
if (ret < 0) {
read_unlock_bh(&set->lock);
@@ -780,7 +778,7 @@ retry:
}
static int
-type_pf_tadd(struct ip_set *set, void *value, gfp_t gfp_flags, u32 timeout)
+type_pf_tadd(struct ip_set *set, void *value, u32 timeout)
{
struct ip_set_hash *h = set->data;
struct htable *t = h->table;
@@ -823,7 +821,7 @@ type_pf_tadd(struct ip_set *set, void *value, gfp_t gfp_flags, u32 timeout)
type_pf_data_timeout_set(data, timeout);
goto out;
}
- ret = type_pf_elem_tadd(n, d, gfp_flags, timeout);
+ ret = type_pf_elem_tadd(n, d, timeout);
if (ret != 0)
goto out;
@@ -837,7 +835,7 @@ out:
}
static int
-type_pf_tdel(struct ip_set *set, void *value, gfp_t gfp_flags, u32 timeout)
+type_pf_tdel(struct ip_set *set, void *value, u32 timeout)
{
struct ip_set_hash *h = set->data;
struct htable *t = h->table;
@@ -867,7 +865,7 @@ type_pf_tdel(struct ip_set *set, void *value, gfp_t gfp_flags, u32 timeout)
if (n->pos + AHASH_INIT_SIZE < n->size) {
void *tmp = kzalloc((n->size - AHASH_INIT_SIZE)
* sizeof(struct type_pf_telem),
- gfp_flags);
+ GFP_ATOMIC);
if (!tmp)
return 0;
n->size -= AHASH_INIT_SIZE;
@@ -884,8 +882,7 @@ type_pf_tdel(struct ip_set *set, void *value, gfp_t gfp_flags, u32 timeout)
#ifdef IP_SET_HASH_WITH_NETS
static inline int
-type_pf_ttest_cidrs(struct ip_set *set, struct type_pf_elem *d,
- gfp_t gfp_flags, u32 timeout)
+type_pf_ttest_cidrs(struct ip_set *set, struct type_pf_elem *d, u32 timeout)
{
struct ip_set_hash *h = set->data;
struct htable *t = h->table;
@@ -910,8 +907,7 @@ type_pf_ttest_cidrs(struct ip_set *set, struct type_pf_elem *d,
#endif
static int
-type_pf_ttest(struct ip_set *set, void *value,
- gfp_t gfp_flags, u32 timeout)
+type_pf_ttest(struct ip_set *set, void *value, u32 timeout)
{
struct ip_set_hash *h = set->data;
struct htable *t = h->table;
@@ -922,7 +918,7 @@ type_pf_ttest(struct ip_set *set, void *value,
#ifdef IP_SET_HASH_WITH_NETS
if (d->cidr == SET_HOST_MASK(set->family))
- return type_pf_ttest_cidrs(set, d, gfp_flags, timeout);
+ return type_pf_ttest_cidrs(set, d, timeout);
#endif
key = HKEY(d, h->initval, t->htable_bits);
n = hbucket(t, key);
diff --git a/kernel/ip_set.c b/kernel/ip_set.c
index b8cfd81..ea4e888 100644
--- a/kernel/ip_set.c
+++ b/kernel/ip_set.c
@@ -1334,8 +1334,7 @@ call_ad(struct sock *ctnl, struct sk_buff *skb,
write_unlock_bh(&set->lock);
} while (ret == -EAGAIN
&& set->variant->resize
- && (ret = set->variant->resize(set, GFP_ATOMIC,
- retried++)) == 0);
+ && (ret = set->variant->resize(set, retried++)) == 0);
if (!ret || (ret == -IPSET_ERR_EXIST && eexist))
return 0;
diff --git a/kernel/ip_set_bitmap_ipmac.c b/kernel/ip_set_bitmap_ipmac.c
index c838658..9b2c02c 100644
--- a/kernel/ip_set_bitmap_ipmac.c
+++ b/kernel/ip_set_bitmap_ipmac.c
@@ -102,8 +102,7 @@ bitmap_ipmac_exist(const struct ipmac_telem *elem)
/* Base variant */
static int
-bitmap_ipmac_test(struct ip_set *set, void *value,
- gfp_t gfp_flags, u32 timeout)
+bitmap_ipmac_test(struct ip_set *set, void *value, u32 timeout)
{
const struct bitmap_ipmac *map = set->data;
const struct ipmac *data = value;
@@ -121,8 +120,7 @@ bitmap_ipmac_test(struct ip_set *set, void *value,
}
static int
-bitmap_ipmac_add(struct ip_set *set, void *value,
- gfp_t gfp_flags, u32 timeout)
+bitmap_ipmac_add(struct ip_set *set, void *value, u32 timeout)
{
struct bitmap_ipmac *map = set->data;
const struct ipmac *data = value;
@@ -151,8 +149,7 @@ bitmap_ipmac_add(struct ip_set *set, void *value,
}
static int
-bitmap_ipmac_del(struct ip_set *set, void *value,
- gfp_t gfp_flags, u32 timeout)
+bitmap_ipmac_del(struct ip_set *set, void *value, u32 timeout)
{
struct bitmap_ipmac *map = set->data;
const struct ipmac *data = value;
@@ -214,8 +211,7 @@ nla_put_failure:
/* Timeout variant */
static int
-bitmap_ipmac_ttest(struct ip_set *set, void *value,
- gfp_t gfp_flags, u32 timeout)
+bitmap_ipmac_ttest(struct ip_set *set, void *value, u32 timeout)
{
const struct bitmap_ipmac *map = set->data;
const struct ipmac *data = value;
@@ -234,8 +230,7 @@ bitmap_ipmac_ttest(struct ip_set *set, void *value,
}
static int
-bitmap_ipmac_tadd(struct ip_set *set, void *value,
- gfp_t gfp_flags, u32 timeout)
+bitmap_ipmac_tadd(struct ip_set *set, void *value, u32 timeout)
{
struct bitmap_ipmac *map = set->data;
const struct ipmac *data = value;
@@ -277,8 +272,7 @@ bitmap_ipmac_tadd(struct ip_set *set, void *value,
}
static int
-bitmap_ipmac_tdel(struct ip_set *set, void *value,
- gfp_t gfp_flags, u32 timeout)
+bitmap_ipmac_tdel(struct ip_set *set, void *value, u32 timeout)
{
struct bitmap_ipmac *map = set->data;
const struct ipmac *data = value;
@@ -360,7 +354,7 @@ bitmap_ipmac_kadt(struct ip_set *set, const struct sk_buff *skb,
data.id -= map->first_ip;
data.ether = eth_hdr(skb)->h_source;
- return adtfn(set, &data, GFP_ATOMIC, map->timeout);
+ return adtfn(set, &data, map->timeout);
}
static const struct nla_policy
@@ -410,7 +404,7 @@ bitmap_ipmac_uadt(struct ip_set *set, struct nlattr *head, int len,
data.id -= map->first_ip;
- ret = adtfn(set, &data, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &data, timeout);
return ip_set_eexist(ret, flags) ? 0 : ret;
}
diff --git a/kernel/ip_set_hash_ip.c b/kernel/ip_set_hash_ip.c
index 0de26b9..bc0c706 100644
--- a/kernel/ip_set_hash_ip.c
+++ b/kernel/ip_set_hash_ip.c
@@ -130,7 +130,7 @@ hash_ip4_kadt(struct ip_set *set, const struct sk_buff *skb,
if (ip == 0)
return -EINVAL;
- return adtfn(set, &ip, GFP_ATOMIC, h->timeout);
+ return adtfn(set, &ip, h->timeout);
}
static const struct nla_policy
@@ -174,7 +174,7 @@ hash_ip4_uadt(struct ip_set *set, struct nlattr *head, int len,
}
if (adt == IPSET_TEST)
- return adtfn(set, &ip, GFP_ATOMIC, timeout);
+ return adtfn(set, &ip, timeout);
ip = ntohl(ip);
if (tb[IPSET_ATTR_IP_TO]) {
@@ -198,7 +198,7 @@ hash_ip4_uadt(struct ip_set *set, struct nlattr *head, int len,
for (; !before(ip_to, ip); ip += hosts) {
nip = htonl(ip);
- ret = adtfn(set, &nip, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &nip, timeout);
if (ret && !ip_set_eexist(ret, flags))
return ret;
@@ -320,7 +320,7 @@ hash_ip6_kadt(struct ip_set *set, const struct sk_buff *skb,
if (ipv6_addr_any(&ip.in6))
return -EINVAL;
- return adtfn(set, &ip, GFP_ATOMIC, h->timeout);
+ return adtfn(set, &ip, h->timeout);
}
static const struct nla_policy
@@ -362,7 +362,7 @@ hash_ip6_uadt(struct ip_set *set, struct nlattr *head, int len,
timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]);
}
- ret = adtfn(set, &ip, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &ip, timeout);
return ip_set_eexist(ret, flags) ? 0 : ret;
}
diff --git a/kernel/ip_set_hash_ipport.c b/kernel/ip_set_hash_ipport.c
index 1a9cd39..d201adf 100644
--- a/kernel/ip_set_hash_ipport.c
+++ b/kernel/ip_set_hash_ipport.c
@@ -149,7 +149,7 @@ hash_ipport4_kadt(struct ip_set *set, const struct sk_buff *skb,
ip4addrptr(skb, flags & IPSET_DIM_ONE_SRC, &data.ip);
- return adtfn(set, &data, GFP_ATOMIC, h->timeout);
+ return adtfn(set, &data, h->timeout);
}
static const struct nla_policy
@@ -212,7 +212,7 @@ hash_ipport4_uadt(struct ip_set *set, struct nlattr *head, int len,
timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]);
}
- ret = adtfn(set, &data, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &data, timeout);
return ip_set_eexist(ret, flags) ? 0 : ret;
}
@@ -336,7 +336,7 @@ hash_ipport6_kadt(struct ip_set *set, const struct sk_buff *skb,
ip6addrptr(skb, flags & IPSET_DIM_ONE_SRC, &data.ip.in6);
- return adtfn(set, &data, GFP_ATOMIC, h->timeout);
+ return adtfn(set, &data, h->timeout);
}
static int
@@ -390,7 +390,7 @@ hash_ipport6_uadt(struct ip_set *set, struct nlattr *head, int len,
timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]);
}
- ret = adtfn(set, &data, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &data, timeout);
return ip_set_eexist(ret, flags) ? 0 : ret;
}
diff --git a/kernel/ip_set_hash_ipportip.c b/kernel/ip_set_hash_ipportip.c
index 37a09f8..53c9e7a 100644
--- a/kernel/ip_set_hash_ipportip.c
+++ b/kernel/ip_set_hash_ipportip.c
@@ -155,7 +155,7 @@ hash_ipportip4_kadt(struct ip_set *set, const struct sk_buff *skb,
ip4addrptr(skb, flags & IPSET_DIM_ONE_SRC, &data.ip);
ip4addrptr(skb, flags & IPSET_DIM_THREE_SRC, &data.ip2);
- return adtfn(set, &data, GFP_ATOMIC, h->timeout);
+ return adtfn(set, &data, h->timeout);
}
static const struct nla_policy
@@ -223,7 +223,7 @@ hash_ipportip4_uadt(struct ip_set *set, struct nlattr *head, int len,
timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]);
}
- ret = adtfn(set, &data, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &data, timeout);
return ip_set_eexist(ret, flags) ? 0 : ret;
}
@@ -353,7 +353,7 @@ hash_ipportip6_kadt(struct ip_set *set, const struct sk_buff *skb,
ip6addrptr(skb, flags & IPSET_DIM_ONE_SRC, &data.ip.in6);
ip6addrptr(skb, flags & IPSET_DIM_THREE_SRC, &data.ip2.in6);
- return adtfn(set, &data, GFP_ATOMIC, h->timeout);
+ return adtfn(set, &data, h->timeout);
}
static int
@@ -411,7 +411,7 @@ hash_ipportip6_uadt(struct ip_set *set, struct nlattr *head, int len,
timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]);
}
- ret = adtfn(set, &data, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &data, timeout);
return ip_set_eexist(ret, flags) ? 0 : ret;
}
diff --git a/kernel/ip_set_hash_ipportnet.c b/kernel/ip_set_hash_ipportnet.c
index f6d4cc2..293fc31 100644
--- a/kernel/ip_set_hash_ipportnet.c
+++ b/kernel/ip_set_hash_ipportnet.c
@@ -175,7 +175,7 @@ hash_ipportnet4_kadt(struct ip_set *set, const struct sk_buff *skb,
ip4addrptr(skb, flags & IPSET_DIM_THREE_SRC, &data.ip2);
data.ip2 &= NETMASK(data.cidr);
- return adtfn(set, &data, GFP_ATOMIC, h->timeout);
+ return adtfn(set, &data, h->timeout);
}
static const struct nla_policy
@@ -252,7 +252,7 @@ hash_ipportnet4_uadt(struct ip_set *set, struct nlattr *head, int len,
timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]);
}
- ret = adtfn(set, &data, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &data, timeout);
return ip_set_eexist(ret, flags) ? 0 : ret;
}
@@ -408,7 +408,7 @@ hash_ipportnet6_kadt(struct ip_set *set, const struct sk_buff *skb,
ip6addrptr(skb, flags & IPSET_DIM_THREE_SRC, &data.ip2.in6);
ip6_netmask(&data.ip2, data.cidr);
- return adtfn(set, &data, GFP_ATOMIC, h->timeout);
+ return adtfn(set, &data, h->timeout);
}
static int
@@ -474,7 +474,7 @@ hash_ipportnet6_uadt(struct ip_set *set, struct nlattr *head, int len,
timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]);
}
- ret = adtfn(set, &data, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &data, timeout);
return ip_set_eexist(ret, flags) ? 0 : ret;
}
diff --git a/kernel/ip_set_hash_net.c b/kernel/ip_set_hash_net.c
index 97cdb83..b13ed98 100644
--- a/kernel/ip_set_hash_net.c
+++ b/kernel/ip_set_hash_net.c
@@ -152,7 +152,7 @@ hash_net4_kadt(struct ip_set *set, const struct sk_buff *skb,
ip4addrptr(skb, flags & IPSET_DIM_ONE_SRC, &data.ip);
data.ip &= NETMASK(data.cidr);
- return adtfn(set, &data, GFP_ATOMIC, h->timeout);
+ return adtfn(set, &data, h->timeout);
}
static const struct nla_policy
@@ -198,7 +198,7 @@ hash_net4_uadt(struct ip_set *set, struct nlattr *head, int len,
timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]);
}
- ret = adtfn(set, &data, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &data, timeout);
return ip_set_eexist(ret, flags) ? 0 : ret;
}
@@ -335,7 +335,7 @@ hash_net6_kadt(struct ip_set *set, const struct sk_buff *skb,
ip6addrptr(skb, flags & IPSET_DIM_ONE_SRC, &data.ip.in6);
ip6_netmask(&data.ip, data.cidr);
- return adtfn(set, &data, GFP_ATOMIC, h->timeout);
+ return adtfn(set, &data, h->timeout);
}
static int
@@ -374,7 +374,7 @@ hash_net6_uadt(struct ip_set *set, struct nlattr *head, int len,
timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]);
}
- ret = adtfn(set, &data, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &data, timeout);
return ip_set_eexist(ret, flags) ? 0 : ret;
}
diff --git a/kernel/ip_set_hash_netport.c b/kernel/ip_set_hash_netport.c
index d13aae6..71539d4 100644
--- a/kernel/ip_set_hash_netport.c
+++ b/kernel/ip_set_hash_netport.c
@@ -171,7 +171,7 @@ hash_netport4_kadt(struct ip_set *set, const struct sk_buff *skb,
ip4addrptr(skb, flags & IPSET_DIM_ONE_SRC, &data.ip);
data.ip &= NETMASK(data.cidr);
- return adtfn(set, &data, GFP_ATOMIC, h->timeout);
+ return adtfn(set, &data, h->timeout);
}
static const struct nla_policy
@@ -241,7 +241,7 @@ hash_netport4_uadt(struct ip_set *set, struct nlattr *head, int len,
timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]);
}
- ret = adtfn(set, &data, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &data, timeout);
return ip_set_eexist(ret, flags) ? 0 : ret;
}
@@ -391,7 +391,7 @@ hash_netport6_kadt(struct ip_set *set, const struct sk_buff *skb,
ip6addrptr(skb, flags & IPSET_DIM_ONE_SRC, &data.ip.in6);
ip6_netmask(&data.ip, data.cidr);
- return adtfn(set, &data, GFP_ATOMIC, h->timeout);
+ return adtfn(set, &data, h->timeout);
}
static int
@@ -451,7 +451,7 @@ hash_netport6_uadt(struct ip_set *set, struct nlattr *head, int len,
timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]);
}
- ret = adtfn(set, &data, GFP_ATOMIC, timeout);
+ ret = adtfn(set, &data, timeout);
return ip_set_eexist(ret, flags) ? 0 : ret;
}