mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-22 09:22:37 +00:00
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 <fdmanana@gmail.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
parent
9b19985986
commit
e84cc14213
@ -3317,10 +3317,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) {
|
||||
|
Loading…
Reference in New Issue
Block a user