Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

btrfs: drop gfp parameter from alloc_extent_map

pass GFP_NOFS directly to kmem_cache_alloc

Signed-off-by: David Sterba <dsterba@suse.cz>

+16 -17
+1 -1
fs/btrfs/disk-io.c
··· 154 154 } 155 155 read_unlock(&em_tree->lock); 156 156 157 - em = alloc_extent_map(GFP_NOFS); 157 + em = alloc_extent_map(); 158 158 if (!em) { 159 159 em = ERR_PTR(-ENOMEM); 160 160 goto out;
+1 -1
fs/btrfs/extent-tree.c
··· 6694 6694 u64 start = extent_key->objectid - offset; 6695 6695 u64 end = start + extent_key->offset - 1; 6696 6696 6697 - em = alloc_extent_map(GFP_NOFS); 6697 + em = alloc_extent_map(); 6698 6698 BUG_ON(!em); 6699 6699 6700 6700 em->start = start;
+2 -3
fs/btrfs/extent_map.c
··· 40 40 41 41 /** 42 42 * alloc_extent_map - allocate new extent map structure 43 - * @mask: memory allocation flags 44 43 * 45 44 * Allocate a new extent_map structure. The new structure is 46 45 * returned with a reference count of one and needs to be 47 46 * freed using free_extent_map() 48 47 */ 49 - struct extent_map *alloc_extent_map(gfp_t mask) 48 + struct extent_map *alloc_extent_map(void) 50 49 { 51 50 struct extent_map *em; 52 - em = kmem_cache_alloc(extent_map_cache, mask); 51 + em = kmem_cache_alloc(extent_map_cache, GFP_NOFS); 53 52 if (!em) 54 53 return NULL; 55 54 em->in_tree = 0;
+1 -1
fs/btrfs/extent_map.h
··· 56 56 struct extent_map *em); 57 57 int remove_extent_mapping(struct extent_map_tree *tree, struct extent_map *em); 58 58 59 - struct extent_map *alloc_extent_map(gfp_t mask); 59 + struct extent_map *alloc_extent_map(void); 60 60 void free_extent_map(struct extent_map *em); 61 61 int __init extent_map_init(void); 62 62 void extent_map_exit(void);
+2 -2
fs/btrfs/file.c
··· 191 191 } 192 192 while (1) { 193 193 if (!split) 194 - split = alloc_extent_map(GFP_NOFS); 194 + split = alloc_extent_map(); 195 195 if (!split2) 196 - split2 = alloc_extent_map(GFP_NOFS); 196 + split2 = alloc_extent_map(); 197 197 BUG_ON(!split || !split2); 198 198 199 199 write_lock(&em_tree->lock);
+6 -6
fs/btrfs/inode.c
··· 649 649 async_extent->start + 650 650 async_extent->ram_size - 1, 0); 651 651 652 - em = alloc_extent_map(GFP_NOFS); 652 + em = alloc_extent_map(); 653 653 BUG_ON(!em); 654 654 em->start = async_extent->start; 655 655 em->len = async_extent->ram_size; ··· 826 826 (u64)-1, &ins, 1); 827 827 BUG_ON(ret); 828 828 829 - em = alloc_extent_map(GFP_NOFS); 829 + em = alloc_extent_map(); 830 830 BUG_ON(!em); 831 831 em->start = start; 832 832 em->orig_start = em->start; ··· 1177 1177 struct extent_map *em; 1178 1178 struct extent_map_tree *em_tree; 1179 1179 em_tree = &BTRFS_I(inode)->extent_tree; 1180 - em = alloc_extent_map(GFP_NOFS); 1180 + em = alloc_extent_map(); 1181 1181 BUG_ON(!em); 1182 1182 em->start = cur_offset; 1183 1183 em->orig_start = em->start; ··· 5069 5069 else 5070 5070 goto out; 5071 5071 } 5072 - em = alloc_extent_map(GFP_NOFS); 5072 + em = alloc_extent_map(); 5073 5073 if (!em) { 5074 5074 err = -ENOMEM; 5075 5075 goto out; ··· 5382 5382 u64 hole_start = start; 5383 5383 u64 hole_len = len; 5384 5384 5385 - em = alloc_extent_map(GFP_NOFS); 5385 + em = alloc_extent_map(); 5386 5386 if (!em) { 5387 5387 err = -ENOMEM; 5388 5388 goto out; ··· 5483 5483 } 5484 5484 5485 5485 if (!em) { 5486 - em = alloc_extent_map(GFP_NOFS); 5486 + em = alloc_extent_map(); 5487 5487 if (!em) { 5488 5488 em = ERR_PTR(-ENOMEM); 5489 5489 goto out;
+1 -1
fs/btrfs/relocation.c
··· 2870 2870 struct extent_map *em; 2871 2871 int ret = 0; 2872 2872 2873 - em = alloc_extent_map(GFP_NOFS); 2873 + em = alloc_extent_map(); 2874 2874 if (!em) 2875 2875 return -ENOMEM; 2876 2876
+2 -2
fs/btrfs/volumes.c
··· 2609 2609 2610 2610 trace_btrfs_chunk_alloc(info->chunk_root, map, start, *num_bytes); 2611 2611 2612 - em = alloc_extent_map(GFP_NOFS); 2612 + em = alloc_extent_map(); 2613 2613 if (!em) { 2614 2614 ret = -ENOMEM; 2615 2615 goto error; ··· 3499 3499 free_extent_map(em); 3500 3500 } 3501 3501 3502 - em = alloc_extent_map(GFP_NOFS); 3502 + em = alloc_extent_map(); 3503 3503 if (!em) 3504 3504 return -ENOMEM; 3505 3505 num_stripes = btrfs_chunk_num_stripes(leaf, chunk);