From: Kent Overstreet Date: Sun, 26 Nov 2023 04:55:26 +0000 (-0500) Subject: bcachefs: Fix bucket data type for stripe buckets X-Git-Tag: v6.7-rc4~18^2~7 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=03013bb0c6b157630018800a456a08646655ea97;p=linux-block.git bcachefs: Fix bucket data type for stripe buckets Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index 61e4cc09ad83..5a91d3189fcf 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -854,8 +854,12 @@ static int __mark_pointer(struct btree_trans *trans, return ret; *dst_sectors += sectors; - *bucket_data_type = *dirty_sectors || *cached_sectors - ? ptr_data_type : 0; + + if (!*dirty_sectors && !*cached_sectors) + *bucket_data_type = 0; + else if (*bucket_data_type != BCH_DATA_stripe) + *bucket_data_type = ptr_data_type; + return 0; }