Btrfs: don't leak block group on error
PATCH 1/1 Btrfs: don't leak block group on error
In extent-tree.c:btrfs_write_dirty_block_groups(), if the call to write_one_cache_group() failed, we would return without putting the block group first.
Signed-off-by Filipe David Borba Manana <[email protected]>
--- fs/btrfs/extent-tree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/btrfs/extent-tree.c +1 -2
@@ -3318,10 +3318,9 @@ again: last = cache->key.objectid + cache->key.offset; err =write_one_cache_group (trans, root, path, cache); +btrfs_put_block_group (cache);if (err)/* File system offline */ goto out; - -btrfs_put_block_group (cache); }while (1 ) {
Signature · 1 line
1.7.9.5