/* Allocates a new cache entry. The new entry will not be valid initially, and thus cannot be looked up yet. It should be filled with data, and then inserted into the cache using mb_cache_entry_insert(). Returns NULL if no more memory was available.  */
struct mb_cache_entry* mb_cache_entry_alloc(struct mb_cache *cache, gfp_t gfp_flags)
/* Allocates a new cache entry. The new entry will not be valid initially, and thus cannot be looked up yet. It should be filled with data, and then inserted into the cache using mb_cache_entry_insert(). Returns NULL if no more memory was available.  */
struct mb_cache_entry* mb_cache_entry_alloc(struct mb_cache *cache, gfp_t gfp_flags)
{
	struct mb_cache_entry *ce;
	ce = kmem_cache_alloc(cache->c_entry_cache, gfp_flags);
	if (ce) {
		atomic_inc(&cache->c_entry_count);
		INIT_LIST_HEAD(&ce->e_lru_list);
		INIT_LIST_HEAD(&ce->e_block_list);
		ce->e_cache = cache;
		ce->e_used = 1 + MB_CACHE_WRITER;
		ce->e_queued = 0;
	}
	return ce;
}