diff options
author | David Sterba <dsterba@suse.com> | 2016-04-26 17:54:39 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-04-29 05:01:47 -0400 |
commit | f734c44a1bfffd762f6f5829cb41224d267b80d9 (patch) | |
tree | 8b674607b257217ba0d2b8151bdd27705aae616e | |
parent | 91166212e0ffbb4db50aa8a238548e967008b33d (diff) |
btrfs: sink gfp parameter to clear_record_extent_bits
Callers pass GFP_NOFS. No need to pass the flags around.
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/extent_io.c | 5 | ||||
-rw-r--r-- | fs/btrfs/extent_io.h | 3 | ||||
-rw-r--r-- | fs/btrfs/qgroup.c | 5 |
3 files changed, 5 insertions, 8 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 2946c1522870..164bda63c5ac 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -1308,8 +1308,7 @@ int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, | |||
1308 | } | 1308 | } |
1309 | 1309 | ||
1310 | int clear_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, | 1310 | int clear_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, |
1311 | unsigned bits, gfp_t mask, | 1311 | unsigned bits, struct extent_changeset *changeset) |
1312 | struct extent_changeset *changeset) | ||
1313 | { | 1312 | { |
1314 | /* | 1313 | /* |
1315 | * Don't support EXTENT_LOCKED case, same reason as | 1314 | * Don't support EXTENT_LOCKED case, same reason as |
@@ -1317,7 +1316,7 @@ int clear_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, | |||
1317 | */ | 1316 | */ |
1318 | BUG_ON(bits & EXTENT_LOCKED); | 1317 | BUG_ON(bits & EXTENT_LOCKED); |
1319 | 1318 | ||
1320 | return __clear_extent_bit(tree, start, end, bits, 0, 0, NULL, mask, | 1319 | return __clear_extent_bit(tree, start, end, bits, 0, 0, NULL, GFP_NOFS, |
1321 | changeset); | 1320 | changeset); |
1322 | } | 1321 | } |
1323 | 1322 | ||
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 90c5c8176162..b7c258c9fa2d 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h | |||
@@ -221,8 +221,7 @@ int test_range_bit(struct extent_io_tree *tree, u64 start, u64 end, | |||
221 | unsigned bits, int filled, | 221 | unsigned bits, int filled, |
222 | struct extent_state *cached_state); | 222 | struct extent_state *cached_state); |
223 | int clear_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, | 223 | int clear_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, |
224 | unsigned bits, gfp_t mask, | 224 | unsigned bits, struct extent_changeset *changeset); |
225 | struct extent_changeset *changeset); | ||
226 | int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, | 225 | int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, |
227 | unsigned bits, int wake, int delete, | 226 | unsigned bits, int wake, int delete, |
228 | struct extent_state **cached, gfp_t mask); | 227 | struct extent_state **cached, gfp_t mask); |
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 9e119552ed32..129392a78986 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c | |||
@@ -2580,8 +2580,7 @@ static int __btrfs_qgroup_release_data(struct inode *inode, u64 start, u64 len, | |||
2580 | return -ENOMEM; | 2580 | return -ENOMEM; |
2581 | 2581 | ||
2582 | ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, start, | 2582 | ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, start, |
2583 | start + len -1, EXTENT_QGROUP_RESERVED, GFP_NOFS, | 2583 | start + len -1, EXTENT_QGROUP_RESERVED, &changeset); |
2584 | &changeset); | ||
2585 | if (ret < 0) | 2584 | if (ret < 0) |
2586 | goto out; | 2585 | goto out; |
2587 | 2586 | ||
@@ -2688,7 +2687,7 @@ void btrfs_qgroup_check_reserved_leak(struct inode *inode) | |||
2688 | return; | 2687 | return; |
2689 | 2688 | ||
2690 | ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, 0, (u64)-1, | 2689 | ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, 0, (u64)-1, |
2691 | EXTENT_QGROUP_RESERVED, GFP_NOFS, &changeset); | 2690 | EXTENT_QGROUP_RESERVED, &changeset); |
2692 | 2691 | ||
2693 | WARN_ON(ret < 0); | 2692 | WARN_ON(ret < 0); |
2694 | if (WARN_ON(changeset.bytes_changed)) { | 2693 | if (WARN_ON(changeset.bytes_changed)) { |