diff options
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 5b84205e7685..23e936c3de76 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -3814,6 +3814,24 @@ int btrfs_block_rsv_add(struct btrfs_root *root, | |||
3814 | return ret; | 3814 | return ret; |
3815 | } | 3815 | } |
3816 | 3816 | ||
3817 | int btrfs_block_rsv_add_noflush(struct btrfs_root *root, | ||
3818 | struct btrfs_block_rsv *block_rsv, | ||
3819 | u64 num_bytes) | ||
3820 | { | ||
3821 | int ret; | ||
3822 | |||
3823 | if (num_bytes == 0) | ||
3824 | return 0; | ||
3825 | |||
3826 | ret = reserve_metadata_bytes(root, block_rsv, num_bytes, 0); | ||
3827 | if (!ret) { | ||
3828 | block_rsv_add_bytes(block_rsv, num_bytes, 1); | ||
3829 | return 0; | ||
3830 | } | ||
3831 | |||
3832 | return ret; | ||
3833 | } | ||
3834 | |||
3817 | int btrfs_block_rsv_check(struct btrfs_root *root, | 3835 | int btrfs_block_rsv_check(struct btrfs_root *root, |
3818 | struct btrfs_block_rsv *block_rsv, int min_factor) | 3836 | struct btrfs_block_rsv *block_rsv, int min_factor) |
3819 | { | 3837 | { |