Skip to content

Commit 8a9fbee

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 560e012 commit 8a9fbee

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
@@ -2536,7 +2536,7 @@ void btrfs_clear_delalloc_extent(struct btrfs_inode *inode,
25362536
*/
25372537
if (bits & EXTENT_CLEAR_META_RESV &&
25382538
root != fs_info->tree_root)
2539-
btrfs_delalloc_release_metadata(inode, len, false);
2539+
btrfs_delalloc_release_metadata(inode, len, true);
25402540

25412541
/* For sanity tests. */
25422542
if (btrfs_is_testing(fs_info))

0 commit comments

Comments
 (0)