projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d527e5c
)
NFSv4.1: Use kcalloc() to allocate zeroed arrays instead of kzalloc()
author
Trond Myklebust
<Trond.Myklebust@netapp.com>
Thu, 11 Oct 2012 18:36:52 +0000
(14:36 -0400)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Mon, 15 Oct 2012 14:49:43 +0000
(10:49 -0400)
Don't circumvent the array size checks.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4filelayout.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4filelayout.c
b/fs/nfs/nfs4filelayout.c
index e7aee566861d67230a85a88168f8690d17534514..2e45fd9c02a38cc9d7b3ee0ee87150fa3a8e7ea8 100644
(file)
--- a/
fs/nfs/nfs4filelayout.c
+++ b/
fs/nfs/nfs4filelayout.c
@@
-750,7
+750,7
@@
filelayout_decode_layout(struct pnfs_layout_hdr *flo,
goto out_err;
if (fl->num_fh > 0) {
- fl->fh_array = k
zalloc(fl->num_fh * sizeof(struct nfs_fh *
),
+ fl->fh_array = k
calloc(fl->num_fh, sizeof(fl->fh_array[0]
),
gfp_flags);
if (!fl->fh_array)
goto out_err;