btrfs: sink gfp parameter to set_extent_delalloc

Callers pass GFP_NOFS and tests pass GFP_KERNEL, but using NOFS there
does not hurt. No need to pass the flags around.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2016-04-26 23:54:39 +02:00
parent af6f8f604d
commit 7cd8c7527c
3 changed files with 6 additions and 6 deletions

View File

@ -291,11 +291,11 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
struct extent_state **cached_state, gfp_t mask); struct extent_state **cached_state, gfp_t mask);
static inline int set_extent_delalloc(struct extent_io_tree *tree, u64 start, static inline int set_extent_delalloc(struct extent_io_tree *tree, u64 start,
u64 end, struct extent_state **cached_state, gfp_t mask) u64 end, struct extent_state **cached_state)
{ {
return set_extent_bit(tree, start, end, return set_extent_bit(tree, start, end,
EXTENT_DELALLOC | EXTENT_UPTODATE, EXTENT_DELALLOC | EXTENT_UPTODATE,
NULL, cached_state, mask); NULL, cached_state, GFP_NOFS);
} }
static inline int set_extent_defrag(struct extent_io_tree *tree, u64 start, static inline int set_extent_defrag(struct extent_io_tree *tree, u64 start,

View File

@ -1962,7 +1962,7 @@ int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end,
{ {
WARN_ON((end & (PAGE_SIZE - 1)) == 0); WARN_ON((end & (PAGE_SIZE - 1)) == 0);
return set_extent_delalloc(&BTRFS_I(inode)->io_tree, start, end, return set_extent_delalloc(&BTRFS_I(inode)->io_tree, start, end,
cached_state, GFP_NOFS); cached_state);
} }
/* see btrfs_writepage_start_hook for details on why this is required */ /* see btrfs_writepage_start_hook for details on why this is required */

View File

@ -113,7 +113,7 @@ static int test_find_delalloc(void)
* |--- delalloc ---| * |--- delalloc ---|
* |--- search ---| * |--- search ---|
*/ */
set_extent_delalloc(&tmp, 0, 4095, NULL, GFP_KERNEL); set_extent_delalloc(&tmp, 0, 4095, NULL);
start = 0; start = 0;
end = 0; end = 0;
found = find_lock_delalloc_range(inode, &tmp, locked_page, &start, found = find_lock_delalloc_range(inode, &tmp, locked_page, &start,
@ -144,7 +144,7 @@ static int test_find_delalloc(void)
test_msg("Couldn't find the locked page\n"); test_msg("Couldn't find the locked page\n");
goto out_bits; goto out_bits;
} }
set_extent_delalloc(&tmp, 4096, max_bytes - 1, NULL, GFP_KERNEL); set_extent_delalloc(&tmp, 4096, max_bytes - 1, NULL);
start = test_start; start = test_start;
end = 0; end = 0;
found = find_lock_delalloc_range(inode, &tmp, locked_page, &start, found = find_lock_delalloc_range(inode, &tmp, locked_page, &start,
@ -199,7 +199,7 @@ static int test_find_delalloc(void)
* *
* We are re-using our test_start from above since it works out well. * We are re-using our test_start from above since it works out well.
*/ */
set_extent_delalloc(&tmp, max_bytes, total_dirty - 1, NULL, GFP_KERNEL); set_extent_delalloc(&tmp, max_bytes, total_dirty - 1, NULL);
start = test_start; start = test_start;
end = 0; end = 0;
found = find_lock_delalloc_range(inode, &tmp, locked_page, &start, found = find_lock_delalloc_range(inode, &tmp, locked_page, &start,