Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
extern int nfs4_proc_layoutcommit(struct nfs4_layoutcommit_data *data,
bool sync);
+extern struct nfs4_slot *nfs4_alloc_slots(u32 max_slots, gfp_t gfp_flags);
+
static inline bool
is_ds_only_client(struct nfs_client *clp)
{
return status;
}
-static struct nfs4_slot *nfs4_alloc_slots(u32 max_slots, gfp_t gfp_flags)
+struct nfs4_slot *nfs4_alloc_slots(u32 max_slots, gfp_t gfp_flags)
{
return kmalloc_array(max_slots, sizeof(struct nfs4_slot), gfp_flags);
}
return 0;
nfs4_begin_drain_session(clp);
fc_tbl = &clp->cl_session->fc_slot_table;
- new = kmalloc(fc_tbl->target_max_slots * sizeof(struct nfs4_slot),
- GFP_NOFS);
+ new = nfs4_alloc_slots(fc_tbl->target_max_slots, GFP_NOFS);
if (!new)
return -ENOMEM;