btrfs: make btrfs_clear_delalloc_extent() free delalloc reserve
authorBoris Burkov <boris@bur.io>
Tue, 26 Mar 2024 18:55:22 +0000 (11:55 -0700)
committerDavid Sterba <dsterba@suse.com>
Tue, 2 Apr 2024 17:19:08 +0000 (19:19 +0200)
commit3c6f0c5ecc8910d4ffb0dfe85609ebc0c91c8f34
tree2017a5b04acaa523da585129729c8378fa41906c
parent211de93367304ab395357f8cb12568a4d1e20701
btrfs: make btrfs_clear_delalloc_extent() free delalloc reserve

Currently, this call site in btrfs_clear_delalloc_extent() only converts
the reservation. We are marking it not delalloc, so I don't think it
makes sense to keep the rsv around.  This is a path where we are not
sure to join a transaction, so it leads to incorrect free-ing during
umount.

Helps with the pass rate of generic/269 and generic/475.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c