Skip to content

Commit 38d777a

Browse files
kdavegregkh
authored andcommitted
btrfs: fix backport of 2175bf5 in 5.4.95
There's a mistake in backport of upstream commit 2175bf5 ("btrfs: fix possible free space tree corruption with online conversion") as 5.4.95 commit e1ae9aa. The enum value BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED has been added to the wrong enum set, colliding with value of BTRFS_FS_QUOTA_ENABLE. This could cause problems during the tree conversion, where the quotas wouldn't be set up properly but the related code executed anyway due to the bit set. Link: https://lore.kernel.org/linux-btrfs/20210219111741.95DD.409509F4@e16-tech.com Reported-by: Wang Yugui <wangyugui@e16-tech.com> CC: stable@vger.kernel.org # 5.4.95+ Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c6dd854 commit 38d777a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

fs/btrfs/ctree.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ enum {
136136
BTRFS_FS_STATE_DEV_REPLACING,
137137
/* The btrfs_fs_info created for self-tests */
138138
BTRFS_FS_STATE_DUMMY_FS_INFO,
139-
140-
/* Indicate that we can't trust the free space tree for caching yet */
141-
BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED,
142139
};
143140

144141
#define BTRFS_BACKREF_REV_MAX 256
@@ -527,6 +524,9 @@ enum {
527524
* so we don't need to offload checksums to workqueues.
528525
*/
529526
BTRFS_FS_CSUM_IMPL_FAST,
527+
528+
/* Indicate that we can't trust the free space tree for caching yet */
529+
BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED,
530530
};
531531

532532
struct btrfs_fs_info {

0 commit comments

Comments
 (0)