diff options
author | Filipe Manana <fdmanana@suse.com> | 2025-05-07 13:05:36 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-05-15 14:30:56 +0200 |
commit | 1f2889f5594a2bc4c6a52634c4a51b93e785def5 (patch) | |
tree | 1a4d9d736dcdebc0fb2ceac4d1a56060ce10fe33 /scripts/lib/kdoc/kdoc_files.py | |
parent | 4ad57e1e224a349cede42e1fcb8abded0e4850ab (diff) |
btrfs: fix qgroup reservation leak on failure to allocate ordered extent
If we fail to allocate an ordered extent for a COW write we end up leaking
a qgroup data reservation since we called btrfs_qgroup_release_data() but
we didn't call btrfs_qgroup_free_refroot() (which would happen when
running the respective data delayed ref created by ordered extent
completion or when finishing the ordered extent in case an error happened).
So make sure we call btrfs_qgroup_free_refroot() if we fail to allocate an
ordered extent for a COW write.
Fixes: 7dbeaad0af7d ("btrfs: change timing for qgroup reserved space for ordered extents to fix reserved space leak")
CC: stable@vger.kernel.org # 6.1+
Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions