Skip to content

Commit 0f9c03d

Browse files
lorddoskiaskdave
authored andcommitted
btrfs: free correct amount of space in btrfs_delayed_inode_reserve_metadata
Following commit f218ea6 ("btrfs: delayed-inode: Remove wrong qgroup meta reservation calls") this function now reserves num_bytes, rather than the fixed amount of nodesize. As such this requires the same amount to be freed in case of failure. Fix this by adjusting the amount we are freeing. Fixes: f218ea6 ("btrfs: delayed-inode: Remove wrong qgroup meta reservation calls") CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent c55a431 commit 0f9c03d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/delayed-inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ static int btrfs_delayed_inode_reserve_metadata(
649649
btrfs_ino(inode),
650650
num_bytes, 1);
651651
} else {
652-
btrfs_qgroup_free_meta_prealloc(root, fs_info->nodesize);
652+
btrfs_qgroup_free_meta_prealloc(root, num_bytes);
653653
}
654654
return ret;
655655
}

0 commit comments

Comments
 (0)