aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2018-05-22 16:43:47 +0800
committerDavid Sterba <dsterba@suse.com>2018-08-06 13:12:49 +0200
commit031f24da2c8a7b611331c368d7bfabccafda09fa (patch)
tree6dace34f520b588feec799e9e7ba8767e3168cd8 /fs/btrfs/ctree.h
parentbtrfs: Rewrite retry logic in do_chunk_alloc (diff)
downloadlinux-dev-031f24da2c8a7b611331c368d7bfabccafda09fa.tar.xz
linux-dev-031f24da2c8a7b611331c368d7bfabccafda09fa.zip
btrfs: Use btrfs_mark_bg_unused to replace open code
Introduce a small helper, btrfs_mark_bg_unused(), to acquire locks and add a block group to unused_bgs list. No functional modification, and only 3 callers are involved. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index bf1451bf3ed7..ee1e152cb94b 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2801,6 +2801,7 @@ void btrfs_wait_for_snapshot_creation(struct btrfs_root *root);
void check_system_chunk(struct btrfs_trans_handle *trans, const u64 type);
u64 add_new_free_space(struct btrfs_block_group_cache *block_group,
u64 start, u64 end);
+void btrfs_mark_bg_unused(struct btrfs_block_group_cache *bg);
/* ctree.c */
int btrfs_bin_search(struct extent_buffer *eb, const struct btrfs_key *key,