mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
FS/NFS: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow. Cc: Trond Myklebust <trond.myklebust@primarydata.com> Cc: linux-nfs@vger.kernel.org Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
parent
0446278999
commit
f15b504144
2 changed files with 2 additions and 2 deletions
|
@ -695,7 +695,7 @@ filelayout_get_device_info(struct inode *inode,
|
|||
if (pdev == NULL)
|
||||
return NULL;
|
||||
|
||||
pages = kzalloc(max_pages * sizeof(struct page *), gfp_flags);
|
||||
pages = kcalloc(max_pages, sizeof(struct page *), gfp_flags);
|
||||
if (pages == NULL) {
|
||||
kfree(pdev);
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue