aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/osd_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ceph/osd_client.c')
-rw-r--r--net/ceph/osd_client.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index d2667e5dddc3..69a2581ddbba 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -584,8 +584,7 @@ struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc,
584 req = kmem_cache_alloc(ceph_osd_request_cache, gfp_flags); 584 req = kmem_cache_alloc(ceph_osd_request_cache, gfp_flags);
585 } else { 585 } else {
586 BUG_ON(num_ops > CEPH_OSD_MAX_OPS); 586 BUG_ON(num_ops > CEPH_OSD_MAX_OPS);
587 req = kmalloc(sizeof(*req) + num_ops * sizeof(req->r_ops[0]), 587 req = kmalloc(struct_size(req, r_ops, num_ops), gfp_flags);
588 gfp_flags);
589 } 588 }
590 if (unlikely(!req)) 589 if (unlikely(!req))
591 return NULL; 590 return NULL;