Commit ba144192 authored by David Sterba's avatar David Sterba

btrfs: drop gfp parameter from alloc_extent_buffer

pass GFP_NOFS directly to kmem_cache_alloc
Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
parent f09d1f60
...@@ -380,7 +380,7 @@ static int csum_dirty_buffer(struct btrfs_root *root, struct page *page) ...@@ -380,7 +380,7 @@ static int csum_dirty_buffer(struct btrfs_root *root, struct page *page)
len = page->private >> 2; len = page->private >> 2;
WARN_ON(len == 0); WARN_ON(len == 0);
eb = alloc_extent_buffer(tree, start, len, page, GFP_NOFS); eb = alloc_extent_buffer(tree, start, len, page);
if (eb == NULL) { if (eb == NULL) {
WARN_ON(1); WARN_ON(1);
goto out; goto out;
...@@ -525,7 +525,7 @@ static int btree_readpage_end_io_hook(struct page *page, u64 start, u64 end, ...@@ -525,7 +525,7 @@ static int btree_readpage_end_io_hook(struct page *page, u64 start, u64 end,
len = page->private >> 2; len = page->private >> 2;
WARN_ON(len == 0); WARN_ON(len == 0);
eb = alloc_extent_buffer(tree, start, len, page, GFP_NOFS); eb = alloc_extent_buffer(tree, start, len, page);
if (eb == NULL) { if (eb == NULL) {
ret = -EIO; ret = -EIO;
goto out; goto out;
...@@ -974,7 +974,7 @@ struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root, ...@@ -974,7 +974,7 @@ struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root,
struct extent_buffer *eb; struct extent_buffer *eb;
eb = alloc_extent_buffer(&BTRFS_I(btree_inode)->io_tree, eb = alloc_extent_buffer(&BTRFS_I(btree_inode)->io_tree,
bytenr, blocksize, NULL, GFP_NOFS); bytenr, blocksize, NULL);
return eb; return eb;
} }
......
...@@ -3266,8 +3266,7 @@ static inline void btrfs_release_extent_buffer(struct extent_buffer *eb) ...@@ -3266,8 +3266,7 @@ static inline void btrfs_release_extent_buffer(struct extent_buffer *eb)
struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,
u64 start, unsigned long len, u64 start, unsigned long len,
struct page *page0, struct page *page0)
gfp_t mask)
{ {
unsigned long num_pages = num_extent_pages(start, len); unsigned long num_pages = num_extent_pages(start, len);
unsigned long i; unsigned long i;
...@@ -3288,7 +3287,7 @@ struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, ...@@ -3288,7 +3287,7 @@ struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,
} }
rcu_read_unlock(); rcu_read_unlock();
eb = __alloc_extent_buffer(tree, start, len, mask); eb = __alloc_extent_buffer(tree, start, len, GFP_NOFS);
if (!eb) if (!eb)
return NULL; return NULL;
...@@ -3305,7 +3304,7 @@ struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, ...@@ -3305,7 +3304,7 @@ struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,
i = 0; i = 0;
} }
for (; i < num_pages; i++, index++) { for (; i < num_pages; i++, index++) {
p = find_or_create_page(mapping, index, mask | __GFP_HIGHMEM); p = find_or_create_page(mapping, index, GFP_NOFS | __GFP_HIGHMEM);
if (!p) { if (!p) {
WARN_ON(1); WARN_ON(1);
goto free_eb; goto free_eb;
......
...@@ -260,8 +260,7 @@ void set_page_extent_mapped(struct page *page); ...@@ -260,8 +260,7 @@ void set_page_extent_mapped(struct page *page);
struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,
u64 start, unsigned long len, u64 start, unsigned long len,
struct page *page0, struct page *page0);
gfp_t mask);
struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree, struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree,
u64 start, unsigned long len); u64 start, unsigned long len);
void free_extent_buffer(struct extent_buffer *eb); void free_extent_buffer(struct extent_buffer *eb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment