aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/extent_map.c')
-rw-r--r--fs/btrfs/extent_map.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index a24a3f2fa13e..2d0410344ea3 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -28,12 +28,11 @@ void extent_map_exit(void)
28/** 28/**
29 * extent_map_tree_init - initialize extent map tree 29 * extent_map_tree_init - initialize extent map tree
30 * @tree: tree to initialize 30 * @tree: tree to initialize
31 * @mask: flags for memory allocations during tree operations
32 * 31 *
33 * Initialize the extent tree @tree. Should be called for each new inode 32 * Initialize the extent tree @tree. Should be called for each new inode
34 * or other user of the extent_map interface. 33 * or other user of the extent_map interface.
35 */ 34 */
36void extent_map_tree_init(struct extent_map_tree *tree, gfp_t mask) 35void extent_map_tree_init(struct extent_map_tree *tree)
37{ 36{
38 tree->map = RB_ROOT; 37 tree->map = RB_ROOT;
39 rwlock_init(&tree->lock); 38 rwlock_init(&tree->lock);
@@ -41,16 +40,15 @@ void extent_map_tree_init(struct extent_map_tree *tree, gfp_t mask)
41 40
42/** 41/**
43 * alloc_extent_map - allocate new extent map structure 42 * alloc_extent_map - allocate new extent map structure
44 * @mask: memory allocation flags
45 * 43 *
46 * Allocate a new extent_map structure. The new structure is 44 * Allocate a new extent_map structure. The new structure is
47 * returned with a reference count of one and needs to be 45 * returned with a reference count of one and needs to be
48 * freed using free_extent_map() 46 * freed using free_extent_map()
49 */ 47 */
50struct extent_map *alloc_extent_map(gfp_t mask) 48struct extent_map *alloc_extent_map(void)
51{ 49{
52 struct extent_map *em; 50 struct extent_map *em;
53 em = kmem_cache_alloc(extent_map_cache, mask); 51 em = kmem_cache_alloc(extent_map_cache, GFP_NOFS);
54 if (!em) 52 if (!em)
55 return NULL; 53 return NULL;
56 em->in_tree = 0; 54 em->in_tree = 0;