aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/filelayout
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-25 20:26:21 +0200
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-06-25 19:02:14 -0400
commitf15b5041440c502726f121b37cf3923562f8dc6f (patch)
treecc1a9b708ed992b75d4726618703aa65d2dc2024 /fs/nfs/filelayout
parentnfs: get rid of duplicate dprintk (diff)
downloadlinux-dev-f15b5041440c502726f121b37cf3923562f8dc6f.tar.xz
linux-dev-f15b5041440c502726f121b37cf3923562f8dc6f.zip
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>
Diffstat (limited to 'fs/nfs/filelayout')
-rw-r--r--fs/nfs/filelayout/filelayoutdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/filelayout/filelayoutdev.c b/fs/nfs/filelayout/filelayoutdev.c
index 44bf0140a4c7..48f8dcdb75db 100644
--- a/fs/nfs/filelayout/filelayoutdev.c
+++ b/fs/nfs/filelayout/filelayoutdev.c
@@ -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;