diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 5ce55f6eefce..c21ed7b14691 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -2119,6 +2119,16 @@ static int insert_reserved_file_extent(struct btrfs_trans_handle *trans, | |||
2119 | ret = btrfs_alloc_reserved_file_extent(trans, root, | 2119 | ret = btrfs_alloc_reserved_file_extent(trans, root, |
2120 | root->root_key.objectid, | 2120 | root->root_key.objectid, |
2121 | btrfs_ino(inode), file_pos, &ins); | 2121 | btrfs_ino(inode), file_pos, &ins); |
2122 | if (ret < 0) | ||
2123 | goto out; | ||
2124 | /* | ||
2125 | * Release the reserved range from inode dirty range map, and | ||
2126 | * move it to delayed ref codes, as now accounting only happens at | ||
2127 | * commit_transaction() time. | ||
2128 | */ | ||
2129 | btrfs_qgroup_release_data(inode, file_pos, ram_bytes); | ||
2130 | ret = btrfs_add_delayed_qgroup_reserve(root->fs_info, trans, | ||
2131 | root->objectid, disk_bytenr, ram_bytes); | ||
2122 | out: | 2132 | out: |
2123 | btrfs_free_path(path); | 2133 | btrfs_free_path(path); |
2124 | 2134 | ||