diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-21 00:57:02 +0100 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-02-01 01:28:22 +0100 |
commit | 7d9dea915fe333357912bce2d624ee848dfbd890 (patch) | |
tree | 885fe85b4439080e15cfaba67e6ab9e179244a05 /fs/nfs/blocklayout | |
parent | NFSv4: Avoid thundering herd issues with nfs_release_seqid (diff) | |
download | linux-7d9dea915fe333357912bce2d624ee848dfbd890.tar.xz linux-7d9dea915fe333357912bce2d624ee848dfbd890.zip |
NFS: Use kcalloc() when allocating arrays
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/blocklayout')
-rw-r--r-- | fs/nfs/blocklayout/extents.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/blocklayout/extents.c b/fs/nfs/blocklayout/extents.c index 1abac09f7cd5..1f9a6032796b 100644 --- a/fs/nfs/blocklayout/extents.c +++ b/fs/nfs/blocklayout/extents.c @@ -147,7 +147,7 @@ static int _preload_range(struct pnfs_inval_markings *marks, count = (int)(end - start) / (int)tree->mtt_step_size; /* Pre-malloc what memory we might need */ - storage = kmalloc(sizeof(*storage) * count, GFP_NOFS); + storage = kcalloc(count, sizeof(*storage), GFP_NOFS); if (!storage) return -ENOMEM; for (i = 0; i < count; i++) { |