]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/net/fq_impl.h
net/fq_impl: Switch to kvmalloc() for memory allocation
[linux.git] / include / net / fq_impl.h
index 107c0d700ed6ffd03cd1dc835f086eb989adbed3..38a9a3d1222b7d5238a1de7f226562bf0e57425e 100644 (file)
@@ -313,7 +313,7 @@ static int fq_init(struct fq *fq, int flows_cnt)
        fq->limit = 8192;
        fq->memory_limit = 16 << 20; /* 16 MBytes */
 
-       fq->flows = kcalloc(fq->flows_cnt, sizeof(fq->flows[0]), GFP_KERNEL);
+       fq->flows = kvcalloc(fq->flows_cnt, sizeof(fq->flows[0]), GFP_KERNEL);
        if (!fq->flows)
                return -ENOMEM;
 
@@ -331,7 +331,7 @@ static void fq_reset(struct fq *fq,
        for (i = 0; i < fq->flows_cnt; i++)
                fq_flow_reset(fq, &fq->flows[i], free_func);
 
-       kfree(fq->flows);
+       kvfree(fq->flows);
        fq->flows = NULL;
 }