diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-10-11 14:36:52 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-10-15 10:49:43 -0400 |
commit | 1813badd98ce02e4b96d8997b68ddef4d4ad4ec5 (patch) | |
tree | 442fac9e179578c560ea113dddc877d8067ca9e4 /fs | |
parent | d527e5c15de8de813cd0a2ad0b769f68c6226938 (diff) |
NFSv4.1: Use kcalloc() to allocate zeroed arrays instead of kzalloc()
Don't circumvent the array size checks.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4filelayout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index e7aee566861d..2e45fd9c02a3 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c | |||
@@ -750,7 +750,7 @@ filelayout_decode_layout(struct pnfs_layout_hdr *flo, | |||
750 | goto out_err; | 750 | goto out_err; |
751 | 751 | ||
752 | if (fl->num_fh > 0) { | 752 | if (fl->num_fh > 0) { |
753 | fl->fh_array = kzalloc(fl->num_fh * sizeof(struct nfs_fh *), | 753 | fl->fh_array = kcalloc(fl->num_fh, sizeof(fl->fh_array[0]), |
754 | gfp_flags); | 754 | gfp_flags); |
755 | if (!fl->fh_array) | 755 | if (!fl->fh_array) |
756 | goto out_err; | 756 | goto out_err; |