treewide: kmalloc() -> kmalloc_array()
[linux-2.6-block.git] / fs / gfs2 / rgrp.c
index 6bc5cfe710d18fc1e7bf6a0550a1a032593e0ccb..33abcf29bc05c4c80114203a05958240c085198b 100644 (file)
@@ -2605,8 +2605,9 @@ void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state)
 {
        unsigned int x;
 
-       rlist->rl_ghs = kmalloc(rlist->rl_rgrps * sizeof(struct gfs2_holder),
-                               GFP_NOFS | __GFP_NOFAIL);
+       rlist->rl_ghs = kmalloc_array(rlist->rl_rgrps,
+                                     sizeof(struct gfs2_holder),
+                                     GFP_NOFS | __GFP_NOFAIL);
        for (x = 0; x < rlist->rl_rgrps; x++)
                gfs2_holder_init(rlist->rl_rgd[x]->rd_gl,
                                state, 0,