Skip to content

Commit

Permalink
NFSv4.1: nfs4_alloc_slots doesn't need zeroing
Browse files Browse the repository at this point in the history
All that memory is going to be initialised to non-zero by
nfs4_add_and_init_slots anyway.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Nov 21, 2012
1 parent 43095d3 commit 2d473d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5658,7 +5658,7 @@ int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo)

static struct nfs4_slot *nfs4_alloc_slots(u32 max_slots, gfp_t gfp_flags)
{
return kcalloc(max_slots, sizeof(struct nfs4_slot), gfp_flags);
return kmalloc_array(max_slots, sizeof(struct nfs4_slot), gfp_flags);
}

static void nfs4_add_and_init_slots(struct nfs4_slot_table *tbl,
Expand Down

0 comments on commit 2d473d3

Please sign in to comment.