mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
IB/mlx4: Suppress non-fatal memory allocations
Failure in kmalloc memory allocations will throw a warning about it.
Such warnings are not needed anymore, since in commit 0ef2f05c7e
("IB/mlx4: Use vmalloc for WR buffers when needed"), fallback mechanism
from kmalloc() to __vmalloc() was added.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
da7525d2a9
commit
9afc60dcc4
2 changed files with 6 additions and 3 deletions
|
@ -795,11 +795,13 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd,
|
|||
if (err)
|
||||
goto err_mtt;
|
||||
|
||||
qp->sq.wrid = kmalloc(qp->sq.wqe_cnt * sizeof(u64), gfp);
|
||||
qp->sq.wrid = kmalloc(qp->sq.wqe_cnt * sizeof(u64),
|
||||
gfp | __GFP_NOWARN);
|
||||
if (!qp->sq.wrid)
|
||||
qp->sq.wrid = __vmalloc(qp->sq.wqe_cnt * sizeof(u64),
|
||||
gfp, PAGE_KERNEL);
|
||||
qp->rq.wrid = kmalloc(qp->rq.wqe_cnt * sizeof(u64), gfp);
|
||||
qp->rq.wrid = kmalloc(qp->rq.wqe_cnt * sizeof(u64),
|
||||
gfp | __GFP_NOWARN);
|
||||
if (!qp->rq.wrid)
|
||||
qp->rq.wrid = __vmalloc(qp->rq.wqe_cnt * sizeof(u64),
|
||||
gfp, PAGE_KERNEL);
|
||||
|
|
|
@ -171,7 +171,8 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd,
|
|||
if (err)
|
||||
goto err_mtt;
|
||||
|
||||
srq->wrid = kmalloc(srq->msrq.max * sizeof (u64), GFP_KERNEL);
|
||||
srq->wrid = kmalloc(srq->msrq.max * sizeof(u64),
|
||||
GFP_KERNEL | __GFP_NOWARN);
|
||||
if (!srq->wrid) {
|
||||
srq->wrid = __vmalloc(srq->msrq.max * sizeof(u64),
|
||||
GFP_KERNEL, PAGE_KERNEL);
|
||||
|
|
Loading…
Reference in a new issue