[v2,1/2] btrfs: check for incompat bit in btrfs_insert_raid_extent

Message ID 20230920-rst-updates-v2-1-b4dc154a648f@wdc.com
State New
Headers
Series btrfs: RAID stripe tree updates |

Commit Message

Johannes Thumshirn Sept. 20, 2023, 9:31 a.m. UTC
  Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/btrfs/raid-stripe-tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/fs/btrfs/raid-stripe-tree.c b/fs/btrfs/raid-stripe-tree.c
index 5e8afe662ed1..7b968eaf9e58 100644
--- a/fs/btrfs/raid-stripe-tree.c
+++ b/fs/btrfs/raid-stripe-tree.c
@@ -263,7 +263,7 @@  int btrfs_insert_raid_extent(struct btrfs_trans_handle *trans,
 	u64 map_type;
 	int ret;
 
-	if (!trans->fs_info->stripe_root)
+	if (!btrfs_fs_incompat(trans->fs_info, RAID_STRIPE_TREE))
 		return 0;
 
 	map_type = list_first_entry(&ordered_extent->bioc_list, typeof(*bioc),