aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/smb2file.c')
-rw-r--r--fs/cifs/smb2file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c
index 45992944e238..7198eac5dddd 100644
--- a/fs/cifs/smb2file.c
+++ b/fs/cifs/smb2file.c
@@ -111,7 +111,7 @@ smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,
111 return -EINVAL; 111 return -EINVAL;
112 112
113 max_num = max_buf / sizeof(struct smb2_lock_element); 113 max_num = max_buf / sizeof(struct smb2_lock_element);
114 buf = kzalloc(max_num * sizeof(struct smb2_lock_element), GFP_KERNEL); 114 buf = kcalloc(max_num, sizeof(struct smb2_lock_element), GFP_KERNEL);
115 if (!buf) 115 if (!buf)
116 return -ENOMEM; 116 return -ENOMEM;
117 117
@@ -247,7 +247,7 @@ smb2_push_mandatory_locks(struct cifsFileInfo *cfile)
247 } 247 }
248 248
249 max_num = max_buf / sizeof(struct smb2_lock_element); 249 max_num = max_buf / sizeof(struct smb2_lock_element);
250 buf = kzalloc(max_num * sizeof(struct smb2_lock_element), GFP_KERNEL); 250 buf = kcalloc(max_num, sizeof(struct smb2_lock_element), GFP_KERNEL);
251 if (!buf) { 251 if (!buf) {
252 free_xid(xid); 252 free_xid(xid);
253 return -ENOMEM; 253 return -ENOMEM;