summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
94ceb39)
master has changed LIBCFS_ALLOC to use vzalloc so LIBCFS_ALLOC_POST
does not contain a memset anymore.
kgnilnd_vmalloc() used LIBCFS_ALLOC_POST to zero memory allocated but
master removed the memset in favor of using vzalloc.
Use the __GFP_ZERO flag in (now named) kgnilnd_vzalloc to zero memory
allocated.
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: Ia014c18f13e4e263eccb51d49d375fc4b3bc8b61
Reviewed-on: http://review.whamcloud.com/15435
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: James Shimek <jshimek@cray.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
}
conn->gnc_tx_ref_table =
}
conn->gnc_tx_ref_table =
- kgnilnd_vmalloc(GNILND_MAX_MSG_ID * sizeof(void *));
+ kgnilnd_vzalloc(GNILND_MAX_MSG_ID * sizeof(void *));
if (conn->gnc_tx_ref_table == NULL) {
CERROR("Can't allocate conn tx_ref_table\n");
GOTO(failed, rc = -ENOMEM);
if (conn->gnc_tx_ref_table == NULL) {
CERROR("Can't allocate conn tx_ref_table\n");
GOTO(failed, rc = -ENOMEM);
return __kgnilnd_mutex_trylock(c_lock);
}
return __kgnilnd_mutex_trylock(c_lock);
}
-static inline void *kgnilnd_vmalloc(int size)
+static inline void *kgnilnd_vzalloc(int size)
- void *ret = __vmalloc(size, __GFP_HIGHMEM | GFP_NOFS, PAGE_KERNEL);
+ void *ret = __vmalloc(size, __GFP_HIGHMEM | GFP_NOFS | __GFP_ZERO,
+ PAGE_KERNEL);
LIBCFS_ALLOC_POST(ret, size);
return ret;
}
LIBCFS_ALLOC_POST(ret, size);
return ret;
}