diff options
author | Josef Bacik <josef@toxicpanda.com> | 2019-06-19 19:47:19 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-07-02 12:30:54 +0200 |
commit | fed14b323db868c3ac0071925763964a6ca58883 (patch) | |
tree | 049ee767fcb3cfb9f5772aed4c55bb64ed845a1b /fs/btrfs/block-rsv.h | |
parent | btrfs: export btrfs_block_rsv_add_bytes (diff) | |
download | linux-fed14b323db868c3ac0071925763964a6ca58883.tar.xz linux-fed14b323db868c3ac0071925763964a6ca58883.zip |
btrfs: export __btrfs_block_rsv_release
The delalloc reserve stuff calls this directly because it cares about
the qgroup accounting stuff, so export it so we can move it around. Fix
btrfs_block_rsv_release() to just be a static inline since it just calls
__btrfs_block_rsv_release() with NULL for the qgroup stuff.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/block-rsv.h')
-rw-r--r-- | fs/btrfs/block-rsv.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/btrfs/block-rsv.h b/fs/btrfs/block-rsv.h index f4af1c0766a7..feb0a4d4b1c9 100644 --- a/fs/btrfs/block-rsv.h +++ b/fs/btrfs/block-rsv.h @@ -70,10 +70,17 @@ int btrfs_block_rsv_use_bytes(struct btrfs_block_rsv *block_rsv, u64 num_bytes); int btrfs_cond_migrate_bytes(struct btrfs_fs_info *fs_info, struct btrfs_block_rsv *dest, u64 num_bytes, int min_factor); -void btrfs_block_rsv_release(struct btrfs_fs_info *fs_info, - struct btrfs_block_rsv *block_rsv, - u64 num_bytes); void btrfs_block_rsv_add_bytes(struct btrfs_block_rsv *block_rsv, u64 num_bytes, bool update_size); +u64 __btrfs_block_rsv_release(struct btrfs_fs_info *fs_info, + struct btrfs_block_rsv *block_rsv, + u64 num_bytes, u64 *qgroup_to_release); + +static inline void btrfs_block_rsv_release(struct btrfs_fs_info *fs_info, + struct btrfs_block_rsv *block_rsv, + u64 num_bytes) +{ + __btrfs_block_rsv_release(fs_info, block_rsv, num_bytes, NULL); +} #endif /* BTRFS_BLOCK_RSV_H */ |