/* Allocate a new extent_map structure. The new structure is returned with a reference count of one and needs to be freed using free_extent_map()  */
struct extent_map* alloc_extent_map(gfp_t mask)
/* Allocate a new extent_map structure. The new structure is returned with a reference count of one and needs to be freed using free_extent_map()  */
struct extent_map* alloc_extent_map(gfp_t mask)
{
	struct extent_map *em;
	em = kmem_cache_alloc(extent_map_cache, mask);
	if (!em || IS_ERR(em))
		return em;
	em->in_tree = 0;
	em->flags = 0;
	atomic_set(&em->refs, 1);
	return em;
}