aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-04-26 17:54:39 -0400
committerDavid Sterba <dsterba@suse.com>2016-04-29 05:01:47 -0400
commit7cd8c7527cb3ad3b397fecfa1bdc8eec9fa33dd8 (patch)
treefdef851aea02cdc7fbbdd3dbc6427626a1a50b06
parentaf6f8f604d44e05f98ed45a69830547ed133adf8 (diff)
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>
-rw-r--r--fs/btrfs/extent_io.h4
-rw-r--r--fs/btrfs/inode.c2
-rw-r--r--fs/btrfs/tests/extent-io-tests.c6
3 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index 9e987ee03361..e99a6befdbf5 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -291,11 +291,11 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
291 struct extent_state **cached_state, gfp_t mask); 291 struct extent_state **cached_state, gfp_t mask);
292 292
293static inline int set_extent_delalloc(struct extent_io_tree *tree, u64 start, 293static inline int set_extent_delalloc(struct extent_io_tree *tree, u64 start,
294 u64 end, struct extent_state **cached_state, gfp_t mask) 294 u64 end, struct extent_state **cached_state)
295{ 295{
296 return set_extent_bit(tree, start, end, 296 return set_extent_bit(tree, start, end,
297 EXTENT_DELALLOC | EXTENT_UPTODATE, 297 EXTENT_DELALLOC | EXTENT_UPTODATE,
298 NULL, cached_state, mask); 298 NULL, cached_state, GFP_NOFS);
299} 299}
300 300
301static inline int set_extent_defrag(struct extent_io_tree *tree, u64 start, 301static inline int set_extent_defrag(struct extent_io_tree *tree, u64 start,
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index d37997f4eb98..1a4bd193962c 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1962,7 +1962,7 @@ int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end,
1962{ 1962{
1963 WARN_ON((end & (PAGE_SIZE - 1)) == 0); 1963 WARN_ON((end & (PAGE_SIZE - 1)) == 0);
1964 return set_extent_delalloc(&BTRFS_I(inode)->io_tree, start, end, 1964 return set_extent_delalloc(&BTRFS_I(inode)->io_tree, start, end,
1965 cached_state, GFP_NOFS); 1965 cached_state);
1966} 1966}
1967 1967
1968/* see btrfs_writepage_start_hook for details on why this is required */ 1968/* see btrfs_writepage_start_hook for details on why this is required */
diff --git a/fs/btrfs/tests/extent-io-tests.c b/fs/btrfs/tests/extent-io-tests.c
index 88e28e5d2c38..c190d2a520d1 100644
--- a/fs/btrfs/tests/extent-io-tests.c
+++ b/fs/btrfs/tests/extent-io-tests.c
@@ -113,7 +113,7 @@ static int test_find_delalloc(void)
113 * |--- delalloc ---| 113 * |--- delalloc ---|
114 * |--- search ---| 114 * |--- search ---|
115 */ 115 */
116 set_extent_delalloc(&tmp, 0, 4095, NULL, GFP_KERNEL); 116 set_extent_delalloc(&tmp, 0, 4095, NULL);
117 start = 0; 117 start = 0;
118 end = 0; 118 end = 0;
119 found = find_lock_delalloc_range(inode, &tmp, locked_page, &start, 119 found = find_lock_delalloc_range(inode, &tmp, locked_page, &start,
@@ -144,7 +144,7 @@ static int test_find_delalloc(void)
144 test_msg("Couldn't find the locked page\n"); 144 test_msg("Couldn't find the locked page\n");
145 goto out_bits; 145 goto out_bits;
146 } 146 }
147 set_extent_delalloc(&tmp, 4096, max_bytes - 1, NULL, GFP_KERNEL); 147 set_extent_delalloc(&tmp, 4096, max_bytes - 1, NULL);
148 start = test_start; 148 start = test_start;
149 end = 0; 149 end = 0;
150 found = find_lock_delalloc_range(inode, &tmp, locked_page, &start, 150 found = find_lock_delalloc_range(inode, &tmp, locked_page, &start,
@@ -199,7 +199,7 @@ static int test_find_delalloc(void)
199 * 199 *
200 * We are re-using our test_start from above since it works out well. 200 * We are re-using our test_start from above since it works out well.
201 */ 201 */
202 set_extent_delalloc(&tmp, max_bytes, total_dirty - 1, NULL, GFP_KERNEL); 202 set_extent_delalloc(&tmp, max_bytes, total_dirty - 1, NULL);
203 start = test_start; 203 start = test_start;
204 end = 0; 204 end = 0;
205 found = find_lock_delalloc_range(inode, &tmp, locked_page, &start, 205 found = find_lock_delalloc_range(inode, &tmp, locked_page, &start,