]>
Commit | Line | Data |
---|---|---|
dd0792fc SL |
1 | From 24d73837c089c17cf7057f54f6761e52a683c199 Mon Sep 17 00:00:00 2001 |
2 | From: Sasha Levin <sashal@kernel.org> | |
3 | Date: Tue, 26 Mar 2024 11:55:22 -0700 | |
4 | Subject: btrfs: make btrfs_clear_delalloc_extent() free delalloc reserve | |
5 | ||
6 | From: Boris Burkov <boris@bur.io> | |
7 | ||
8 | [ Upstream commit 3c6f0c5ecc8910d4ffb0dfe85609ebc0c91c8f34 ] | |
9 | ||
10 | Currently, this call site in btrfs_clear_delalloc_extent() only converts | |
11 | the reservation. We are marking it not delalloc, so I don't think it | |
12 | makes sense to keep the rsv around. This is a path where we are not | |
13 | sure to join a transaction, so it leads to incorrect free-ing during | |
14 | umount. | |
15 | ||
16 | Helps with the pass rate of generic/269 and generic/475. | |
17 | ||
18 | Reviewed-by: Qu Wenruo <wqu@suse.com> | |
19 | Signed-off-by: Boris Burkov <boris@bur.io> | |
20 | Signed-off-by: David Sterba <dsterba@suse.com> | |
21 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
22 | --- | |
23 | fs/btrfs/inode.c | 2 +- | |
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
25 | ||
26 | diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c | |
27 | index 591caac2bf814..1f99d7dced17a 100644 | |
28 | --- a/fs/btrfs/inode.c | |
29 | +++ b/fs/btrfs/inode.c | |
30 | @@ -2070,7 +2070,7 @@ void btrfs_clear_delalloc_extent(struct inode *vfs_inode, | |
31 | */ | |
32 | if (*bits & EXTENT_CLEAR_META_RESV && | |
33 | root != fs_info->tree_root) | |
34 | - btrfs_delalloc_release_metadata(inode, len, false); | |
35 | + btrfs_delalloc_release_metadata(inode, len, true); | |
36 | ||
37 | /* For sanity tests. */ | |
38 | if (btrfs_is_testing(fs_info)) | |
39 | -- | |
40 | 2.43.0 | |
41 |