summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/lock_dlm.c
diff options
context:
space:
mode:
authorFabian Frederick2014-06-25 20:40:45 +0200
committerSteven Whitehouse2014-07-18 12:13:38 +0200
commit6ec43b1838bd71633ac3f853c63ddf1f5940b1ed (patch)
tree120d5361ccec503780222238ffac5749c5ba079a /fs/gfs2/lock_dlm.c
parentGFS2: Use GFP_NOFS when allocating glocks (diff)
downloadkernel-qcow2-linux-6ec43b1838bd71633ac3f853c63ddf1f5940b1ed.tar.gz
kernel-qcow2-linux-6ec43b1838bd71633ac3f853c63ddf1f5940b1ed.tar.xz
kernel-qcow2-linux-6ec43b1838bd71633ac3f853c63ddf1f5940b1ed.zip
GFS2: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow. Cc: cluster-devel@redhat.com Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/lock_dlm.c')
-rw-r--r--fs/gfs2/lock_dlm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c
index 91f274de1246..4fafea1c9ecf 100644
--- a/fs/gfs2/lock_dlm.c
+++ b/fs/gfs2/lock_dlm.c
@@ -1036,8 +1036,8 @@ static int set_recover_size(struct gfs2_sbd *sdp, struct dlm_slot *slots,
new_size = old_size + RECOVER_SIZE_INC;
- submit = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS);
- result = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS);
+ submit = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
+ result = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS);
if (!submit || !result) {
kfree(submit);
kfree(result);