aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2011-04-20 19:12:06 -0400
committerDavid Sterba <dsterba@suse.cz>2011-05-02 07:57:22 -0400
commitba14419264684b290f0d0b7f48d26eafb11fc0c6 (patch)
tree0620d8dac3cfaa34383ac88ab19293e89a256997 /fs/btrfs
parentf09d1f60e6aa82fb4cfaa525e21f6287fc1516f4 (diff)
btrfs: drop gfp parameter from alloc_extent_buffer
pass GFP_NOFS directly to kmem_cache_alloc Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/disk-io.c6
-rw-r--r--fs/btrfs/extent_io.c7
-rw-r--r--fs/btrfs/extent_io.h3
3 files changed, 7 insertions, 9 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 1c0752e99066..4084959b36fd 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -380,7 +380,7 @@ static int csum_dirty_buffer(struct btrfs_root *root, struct page *page)
380 len = page->private >> 2; 380 len = page->private >> 2;
381 WARN_ON(len == 0); 381 WARN_ON(len == 0);
382 382
383 eb = alloc_extent_buffer(tree, start, len, page, GFP_NOFS); 383 eb = alloc_extent_buffer(tree, start, len, page);
384 if (eb == NULL) { 384 if (eb == NULL) {
385 WARN_ON(1); 385 WARN_ON(1);
386 goto out; 386 goto out;
@@ -525,7 +525,7 @@ static int btree_readpage_end_io_hook(struct page *page, u64 start, u64 end,
525 len = page->private >> 2; 525 len = page->private >> 2;
526 WARN_ON(len == 0); 526 WARN_ON(len == 0);
527 527
528 eb = alloc_extent_buffer(tree, start, len, page, GFP_NOFS); 528 eb = alloc_extent_buffer(tree, start, len, page);
529 if (eb == NULL) { 529 if (eb == NULL) {
530 ret = -EIO; 530 ret = -EIO;
531 goto out; 531 goto out;
@@ -974,7 +974,7 @@ struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root,
974 struct extent_buffer *eb; 974 struct extent_buffer *eb;
975 975
976 eb = alloc_extent_buffer(&BTRFS_I(btree_inode)->io_tree, 976 eb = alloc_extent_buffer(&BTRFS_I(btree_inode)->io_tree,
977 bytenr, blocksize, NULL, GFP_NOFS); 977 bytenr, blocksize, NULL);
978 return eb; 978 return eb;
979} 979}
980 980
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index ad0f0a95ad3a..9369289ce771 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3266,8 +3266,7 @@ static inline void btrfs_release_extent_buffer(struct extent_buffer *eb)
3266 3266
3267struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, 3267struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,
3268 u64 start, unsigned long len, 3268 u64 start, unsigned long len,
3269 struct page *page0, 3269 struct page *page0)
3270 gfp_t mask)
3271{ 3270{
3272 unsigned long num_pages = num_extent_pages(start, len); 3271 unsigned long num_pages = num_extent_pages(start, len);
3273 unsigned long i; 3272 unsigned long i;
@@ -3288,7 +3287,7 @@ struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,
3288 } 3287 }
3289 rcu_read_unlock(); 3288 rcu_read_unlock();
3290 3289
3291 eb = __alloc_extent_buffer(tree, start, len, mask); 3290 eb = __alloc_extent_buffer(tree, start, len, GFP_NOFS);
3292 if (!eb) 3291 if (!eb)
3293 return NULL; 3292 return NULL;
3294 3293
@@ -3305,7 +3304,7 @@ struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,
3305 i = 0; 3304 i = 0;
3306 } 3305 }
3307 for (; i < num_pages; i++, index++) { 3306 for (; i < num_pages; i++, index++) {
3308 p = find_or_create_page(mapping, index, mask | __GFP_HIGHMEM); 3307 p = find_or_create_page(mapping, index, GFP_NOFS | __GFP_HIGHMEM);
3309 if (!p) { 3308 if (!p) {
3310 WARN_ON(1); 3309 WARN_ON(1);
3311 goto free_eb; 3310 goto free_eb;
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index ff220c3c01b0..3c3be74c934e 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -260,8 +260,7 @@ void set_page_extent_mapped(struct page *page);
260 260
261struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, 261struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,
262 u64 start, unsigned long len, 262 u64 start, unsigned long len,
263 struct page *page0, 263 struct page *page0);
264 gfp_t mask);
265struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree, 264struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree,
266 u64 start, unsigned long len); 265 u64 start, unsigned long len);
267void free_extent_buffer(struct extent_buffer *eb); 266void free_extent_buffer(struct extent_buffer *eb);