RDMA/mlx4: Remove gfp_mask argument from acquire_group call
All callers of acquire_group() passed the same gfp_mask to it and it is safe to remove it. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
82901e3eb8
commit
31f97bad06
|
@ -808,8 +808,7 @@ static ssize_t sysfs_show_group(struct device *dev,
|
||||||
struct device_attribute *attr, char *buf);
|
struct device_attribute *attr, char *buf);
|
||||||
|
|
||||||
static struct mcast_group *acquire_group(struct mlx4_ib_demux_ctx *ctx,
|
static struct mcast_group *acquire_group(struct mlx4_ib_demux_ctx *ctx,
|
||||||
union ib_gid *mgid, int create,
|
union ib_gid *mgid, int create)
|
||||||
gfp_t gfp_mask)
|
|
||||||
{
|
{
|
||||||
struct mcast_group *group, *cur_group;
|
struct mcast_group *group, *cur_group;
|
||||||
int is_mgid0;
|
int is_mgid0;
|
||||||
|
@ -825,7 +824,7 @@ static struct mcast_group *acquire_group(struct mlx4_ib_demux_ctx *ctx,
|
||||||
if (!create)
|
if (!create)
|
||||||
return ERR_PTR(-ENOENT);
|
return ERR_PTR(-ENOENT);
|
||||||
|
|
||||||
group = kzalloc(sizeof *group, gfp_mask);
|
group = kzalloc(sizeof(*group), GFP_KERNEL);
|
||||||
if (!group)
|
if (!group)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
|
@ -892,7 +891,7 @@ int mlx4_ib_mcg_demux_handler(struct ib_device *ibdev, int port, int slave,
|
||||||
case IB_MGMT_METHOD_GET_RESP:
|
case IB_MGMT_METHOD_GET_RESP:
|
||||||
case IB_SA_METHOD_DELETE_RESP:
|
case IB_SA_METHOD_DELETE_RESP:
|
||||||
mutex_lock(&ctx->mcg_table_lock);
|
mutex_lock(&ctx->mcg_table_lock);
|
||||||
group = acquire_group(ctx, &rec->mgid, 0, GFP_KERNEL);
|
group = acquire_group(ctx, &rec->mgid, 0);
|
||||||
mutex_unlock(&ctx->mcg_table_lock);
|
mutex_unlock(&ctx->mcg_table_lock);
|
||||||
if (IS_ERR(group)) {
|
if (IS_ERR(group)) {
|
||||||
if (mad->mad_hdr.method == IB_MGMT_METHOD_GET_RESP) {
|
if (mad->mad_hdr.method == IB_MGMT_METHOD_GET_RESP) {
|
||||||
|
@ -954,7 +953,7 @@ int mlx4_ib_mcg_multiplex_handler(struct ib_device *ibdev, int port,
|
||||||
req->sa_mad = *sa_mad;
|
req->sa_mad = *sa_mad;
|
||||||
|
|
||||||
mutex_lock(&ctx->mcg_table_lock);
|
mutex_lock(&ctx->mcg_table_lock);
|
||||||
group = acquire_group(ctx, &rec->mgid, may_create, GFP_KERNEL);
|
group = acquire_group(ctx, &rec->mgid, may_create);
|
||||||
mutex_unlock(&ctx->mcg_table_lock);
|
mutex_unlock(&ctx->mcg_table_lock);
|
||||||
if (IS_ERR(group)) {
|
if (IS_ERR(group)) {
|
||||||
kfree(req);
|
kfree(req);
|
||||||
|
|
Loading…
Reference in New Issue