Skip to contentSkip to conversation

bcachefs: Add a comment to clarify the removal of __counted_by

PATCH New Alan Huang 1 participant 1 message May 1, 2025

lore
Share & tools
lore

Alan Huang

author
#0 lore raw

PATCH 1/1 bcachefs: Add a comment to clarify the removal of __counted_by

---
 fs/bcachefs/xattr_format.h | 6 ++++++
 1 file changed, 6 insertions(+)
fs/bcachefs/xattr_format.h +6 -0
index e9f810539552..8fe0bb897038 100644
@@ -13,6 +13,12 @@ struct bch_xattr {
 	__u8			x_type;
 	__u8			x_name_len;
 	__le16			x_val_len;
+	/*
+	 * Do not reintroduce __counted_by(x_name_len) here.
+	 * There is a value following x_name. __counted_by requires
+	 * that the flexible array member contains exactly the
+	 * amount of elements that are specified.
+	 */
 	__u8			x_name[];
 } __packed __aligned(8);
 
Signature · 1 line
2.48.1