net: use the new API kvfree()
It is available since v3.15-rc5. Cc: Pablo Neira Ayuso <pablo@netfilter.org> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9638f6713f
commit
4cb28970a2
@@ -391,12 +391,7 @@ static const struct nla_policy choke_policy[TCA_CHOKE_MAX + 1] = {
|
||||
|
||||
static void choke_free(void *addr)
|
||||
{
|
||||
if (addr) {
|
||||
if (is_vmalloc_addr(addr))
|
||||
vfree(addr);
|
||||
else
|
||||
kfree(addr);
|
||||
}
|
||||
kvfree(addr);
|
||||
}
|
||||
|
||||
static int choke_change(struct Qdisc *sch, struct nlattr *opt)
|
||||
|
@@ -591,10 +591,7 @@ static void *fq_alloc_node(size_t sz, int node)
|
||||
|
||||
static void fq_free(void *addr)
|
||||
{
|
||||
if (addr && is_vmalloc_addr(addr))
|
||||
vfree(addr);
|
||||
else
|
||||
kfree(addr);
|
||||
kvfree(addr);
|
||||
}
|
||||
|
||||
static int fq_resize(struct Qdisc *sch, u32 log)
|
||||
|
@@ -365,12 +365,7 @@ static void *fq_codel_zalloc(size_t sz)
|
||||
|
||||
static void fq_codel_free(void *addr)
|
||||
{
|
||||
if (addr) {
|
||||
if (is_vmalloc_addr(addr))
|
||||
vfree(addr);
|
||||
else
|
||||
kfree(addr);
|
||||
}
|
||||
kvfree(addr);
|
||||
}
|
||||
|
||||
static void fq_codel_destroy(struct Qdisc *sch)
|
||||
|
@@ -494,12 +494,7 @@ static void *hhf_zalloc(size_t sz)
|
||||
|
||||
static void hhf_free(void *addr)
|
||||
{
|
||||
if (addr) {
|
||||
if (is_vmalloc_addr(addr))
|
||||
vfree(addr);
|
||||
else
|
||||
kfree(addr);
|
||||
}
|
||||
kvfree(addr);
|
||||
}
|
||||
|
||||
static void hhf_destroy(struct Qdisc *sch)
|
||||
|
@@ -648,12 +648,7 @@ static void netem_reset(struct Qdisc *sch)
|
||||
|
||||
static void dist_free(struct disttable *d)
|
||||
{
|
||||
if (d) {
|
||||
if (is_vmalloc_addr(d))
|
||||
vfree(d);
|
||||
else
|
||||
kfree(d);
|
||||
}
|
||||
kvfree(d);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -716,12 +716,7 @@ static void *sfq_alloc(size_t sz)
|
||||
|
||||
static void sfq_free(void *addr)
|
||||
{
|
||||
if (addr) {
|
||||
if (is_vmalloc_addr(addr))
|
||||
vfree(addr);
|
||||
else
|
||||
kfree(addr);
|
||||
}
|
||||
kvfree(addr);
|
||||
}
|
||||
|
||||
static void sfq_destroy(struct Qdisc *sch)
|
||||
|
Reference in New Issue
Block a user