f_dentry||f_path.dentry
[^_]get_seconds||ktime_get_real_seconds
GETSTRIPE||LFS getstripe
+kmem_cache_alloc.*GFP_ZERO||kmem_cache_zalloc
ldebugfs_remove||debugfs_remove_recursive
ldlm_appetite_t||enum ldlm_appetite
ldlm_cancel_flags_t||enum ldlm_cancel_flags
{
struct lnet_msg *msg;
- msg = kmem_cache_alloc(lnet_msg_cachep, GFP_NOFS | __GFP_ZERO);
+ msg = kmem_cache_zalloc(lnet_msg_cachep, GFP_NOFS);
return (msg);
}
{
struct lnet_rsp_tracker *rspt;
- rspt = kmem_cache_alloc(lnet_rspt_cachep, GFP_NOFS | __GFP_ZERO);
+ rspt = kmem_cache_zalloc(lnet_rspt_cachep, GFP_NOFS);
if (rspt) {
lnet_net_lock(cpt);
the_lnet.ln_counters[cpt]->lct_health.lch_rst_alloc++;
if (CFS_FAIL_CHECK(CFS_FAIL_GNI_ALLOC_TX))
return tx;
- tx = kmem_cache_alloc(kgnilnd_data.kgn_tx_cache, GFP_ATOMIC);
+ tx = kmem_cache_zalloc(kgnilnd_data.kgn_tx_cache, GFP_ATOMIC);
if (tx == NULL) {
CERROR("failed to allocate tx\n");
return NULL;
CDEBUG(D_MALLOC, "slab-alloced 'tx': %lu at %p.\n",
sizeof(*tx), tx);
- /* need this memset, cache alloc'd memory is not cleared */
- memset(tx, 0, sizeof(*tx));
-
/* setup everything here to minimize time under the lock */
tx->tx_buftype = GNILND_BUF_NONE;
tx->tx_msg.gnm_type = GNILND_MSG_NONE;
{
kgn_dgram_t *dgram;
- dgram = kmem_cache_alloc(kgnilnd_data.kgn_dgram_cache, GFP_ATOMIC);
+ dgram = kmem_cache_zalloc(kgnilnd_data.kgn_dgram_cache, GFP_ATOMIC);
if (dgram == NULL)
return -ENOMEM;
- /* cache alloc'd memory is not zeroed */
- memset((void *)dgram, 0, sizeof(*dgram)) ;
-
INIT_LIST_HEAD(&dgram->gndg_list);
dgram->gndg_state = GNILND_DGRAM_USED;
dgram->gndg_type = type;
if (mtable == NULL) /* can't match portal type */
return ERR_PTR(-EPERM);
- me = kmem_cache_alloc(lnet_mes_cachep, GFP_NOFS | __GFP_ZERO);
+ me = kmem_cache_zalloc(lnet_mes_cachep, GFP_NOFS);
if (me == NULL) {
CDEBUG(D_MALLOC, "failed to allocate 'me'\n");
return ERR_PTR(-ENOMEM);
do { \
LASSERT(ergo((type) != GFP_ATOMIC, !in_interrupt())); \
(ptr) = (cptab) == NULL ? \
- kmem_cache_alloc(slab, (type) | __GFP_ZERO) : \
+ kmem_cache_zalloc(slab, (type)) : \
cfs_mem_cache_cpt_alloc(slab, cptab, cpt, (type) | __GFP_ZERO); \
if (likely((ptr))) \
OBD_ALLOC_POST(ptr, size, "slab-alloced"); \