btrfs: sink gfp parameter to clear_extent_bits
authorDavid Sterba <dsterba@suse.com>
Tue, 26 Apr 2016 21:54:39 +0000 (23:54 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 29 Apr 2016 09:01:47 +0000 (11:01 +0200)
Callers pass GFP_NOFS and GFP_KERNEL. No need to pass the flags around.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/inode.c
fs/btrfs/relocation.c
fs/btrfs/scrub.c
fs/btrfs/tests/extent-io-tests.c
fs/btrfs/tree-log.c

index 4e47849d7427247dd179e8d4f320c5fcda687809..3bc88b4b0032ba5769422de2c249909fc77b9906 100644 (file)
@@ -4357,7 +4357,7 @@ static int btrfs_destroy_marked_extents(struct btrfs_root *root,
                if (ret)
                        break;
 
-               clear_extent_bits(dirty_pages, start, end, mark, GFP_NOFS);
+               clear_extent_bits(dirty_pages, start, end, mark);
                while (start <= end) {
                        eb = btrfs_find_tree_block(root->fs_info, start);
                        start += root->nodesize;
index 0cfddbe8abba647256145b86851f557a249d7b1b..b1c6d7634e88284a1e468c399cbda6d3e88282d4 100644 (file)
@@ -246,9 +246,9 @@ static void free_excluded_extents(struct btrfs_root *root,
        end = start + cache->key.offset - 1;
 
        clear_extent_bits(&root->fs_info->freed_extents[0],
-                         start, end, EXTENT_UPTODATE, GFP_NOFS);
+                         start, end, EXTENT_UPTODATE);
        clear_extent_bits(&root->fs_info->freed_extents[1],
-                         start, end, EXTENT_UPTODATE, GFP_NOFS);
+                         start, end, EXTENT_UPTODATE);
 }
 
 static int exclude_super_stripes(struct btrfs_root *root,
@@ -10526,14 +10526,14 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info)
                 */
                mutex_lock(&fs_info->unused_bg_unpin_mutex);
                ret = clear_extent_bits(&fs_info->freed_extents[0], start, end,
-                                 EXTENT_DIRTY, GFP_NOFS);
+                                 EXTENT_DIRTY);
                if (ret) {
                        mutex_unlock(&fs_info->unused_bg_unpin_mutex);
                        btrfs_dec_block_group_ro(root, block_group);
                        goto end_trans;
                }
                ret = clear_extent_bits(&fs_info->freed_extents[1], start, end,
-                                 EXTENT_DIRTY, GFP_NOFS);
+                                 EXTENT_DIRTY);
                if (ret) {
                        mutex_unlock(&fs_info->unused_bg_unpin_mutex);
                        btrfs_dec_block_group_ro(root, block_group);
index 3b53d217066cd0851ba5a0d52c5926e4600a95d1..2946c152287025f96102408961549c10fa6d420b 100644 (file)
@@ -1975,13 +1975,13 @@ int free_io_failure(struct inode *inode, struct io_failure_record *rec)
        set_state_failrec(failure_tree, rec->start, NULL);
        ret = clear_extent_bits(failure_tree, rec->start,
                                rec->start + rec->len - 1,
-                               EXTENT_LOCKED | EXTENT_DIRTY, GFP_NOFS);
+                               EXTENT_LOCKED | EXTENT_DIRTY);
        if (ret)
                err = ret;
 
        ret = clear_extent_bits(&BTRFS_I(inode)->io_tree, rec->start,
                                rec->start + rec->len - 1,
-                               EXTENT_DAMAGED, GFP_NOFS);
+                               EXTENT_DAMAGED);
        if (ret && !err)
                err = ret;
 
index 447c6e6ff88c0523cdcddafcdc272b3b79104c42..90c5c817616234bab6c75c4db3924c9fad3fb33f 100644 (file)
@@ -241,14 +241,15 @@ static inline int unlock_extent_cached(struct extent_io_tree *tree, u64 start,
 }
 
 static inline int clear_extent_bits(struct extent_io_tree *tree, u64 start,
-               u64 end, unsigned bits, gfp_t mask)
+               u64 end, unsigned bits)
 {
        int wake = 0;
 
        if (bits & EXTENT_LOCKED)
                wake = 1;
 
-       return clear_extent_bit(tree, start, end, bits, wake, 0, NULL, mask);
+       return clear_extent_bit(tree, start, end, bits, wake, 0, NULL,
+                       GFP_NOFS);
 }
 
 int set_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end,
index 2aaba58b4856be3fc6b179ad3e2d0e94e559dc04..d37997f4eb985668f1335804d3d9aee688099a91 100644 (file)
@@ -3103,8 +3103,7 @@ static int btrfs_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
 
        if (root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID &&
            test_range_bit(io_tree, start, end, EXTENT_NODATASUM, 1, NULL)) {
-               clear_extent_bits(io_tree, start, end, EXTENT_NODATASUM,
-                                 GFP_NOFS);
+               clear_extent_bits(io_tree, start, end, EXTENT_NODATASUM);
                return 0;
        }
 
index 78cbfb530de60f062b7967f9532b826507025e68..bd5ea1a8a9f1c4b926227c902f4416a02b92d223 100644 (file)
@@ -4059,8 +4059,7 @@ restart:
        }
 
        btrfs_release_path(path);
-       clear_extent_bits(&rc->processed_blocks, 0, (u64)-1, EXTENT_DIRTY,
-                         GFP_NOFS);
+       clear_extent_bits(&rc->processed_blocks, 0, (u64)-1, EXTENT_DIRTY);
 
        if (trans) {
                btrfs_end_transaction_throttle(trans, rc->extent_root);
index 9d24375eed1f0cffdba7c26bbdd874ff46156cb6..841dae874a21a91271d2e12729b7b30f90b96464 100644 (file)
@@ -763,7 +763,7 @@ static int scrub_fixup_readpage(u64 inum, u64 offset, u64 root, void *fixup_ctx)
                                                end, EXTENT_DAMAGED, 0, NULL);
                if (!corrected)
                        clear_extent_bits(&BTRFS_I(inode)->io_tree, offset, end,
-                                               EXTENT_DAMAGED, GFP_NOFS);
+                                               EXTENT_DAMAGED);
        }
 
 out:
index 70948b13bc811fbe24592a32fec4d45e4459a4ac..88e28e5d2c38e6616bb2936ae9fcac530fbe9b27 100644 (file)
@@ -262,7 +262,7 @@ static int test_find_delalloc(void)
        }
        ret = 0;
 out_bits:
-       clear_extent_bits(&tmp, 0, total_dirty - 1, (unsigned)-1, GFP_KERNEL);
+       clear_extent_bits(&tmp, 0, total_dirty - 1, (unsigned)-1);
 out:
        if (locked_page)
                put_page(locked_page);
index 517d0ccb351e205a4f415c15c4735c3a76647b91..a111e275ab9ee4b5eabcce49238c8bb6d64d022b 100644 (file)
@@ -3001,7 +3001,7 @@ static void free_log_tree(struct btrfs_trans_handle *trans,
                        break;
 
                clear_extent_bits(&log->dirty_log_pages, start, end,
-                                 EXTENT_DIRTY | EXTENT_NEW, GFP_NOFS);
+                                 EXTENT_DIRTY | EXTENT_NEW);
        }
 
        /*