summaryrefslogtreecommitdiffstats
path: root/fs/nfs/blocklayout
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/blocklayout
parent0446278999e5b622b309179ba392efcb5d8b8a46 (diff)
downloadlinux-f15b5041440c502726f121b37cf3923562f8dc6f.tar.bz2
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/blocklayout')
-rw-r--r--fs/nfs/blocklayout/blocklayout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 04ac32b339f8..cbb1797149d5 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -1062,7 +1062,7 @@ nfs4_blk_get_deviceinfo(struct nfs_server *server, const struct nfs_fh *fh,
return ERR_PTR(-ENOMEM);
}
- pages = kzalloc(max_pages * sizeof(struct page *), GFP_NOFS);
+ pages = kcalloc(max_pages, sizeof(struct page *), GFP_NOFS);
if (pages == NULL) {
kfree(dev);
return ERR_PTR(-ENOMEM);