Skip to content

Commit 3c6f0c5

Browse files
boryaskdave
authored andcommitted
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 <[email protected]> Signed-off-by: Boris Burkov <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 211de93 commit 3c6f0c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2533,7 +2533,7 @@ void btrfs_clear_delalloc_extent(struct btrfs_inode *inode,
25332533
*/
25342534
if (bits & EXTENT_CLEAR_META_RESV &&
25352535
root != fs_info->tree_root)
2536-
btrfs_delalloc_release_metadata(inode, len, false);
2536+
btrfs_delalloc_release_metadata(inode, len, true);
25372537

25382538
/* For sanity tests. */
25392539
if (btrfs_is_testing(fs_info))

0 commit comments

Comments
 (0)