Skip to contentSkip to conversation

block: remove bogus union

PATCH Applied Kanchan Joshi 3 participants 3 messages Sep 17, 2024 1 message not in the archive Block layer

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20240917050236epcas5p3b032bf733800ef5b2b9d1ebe9ce92838@epcas5p3.samsung.com

#1 lore raw

PATCH 1/1 block: remove bogus union

The union around bi_integrity field is pointless.
Remove it.

---
 include/linux/blk_types.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
include/linux/blk_types.h +1 -3
index 36ed96133217..6d3a0fff2a1d 100644
@@ -248,11 +248,9 @@ struct bio {
 	struct bio_crypt_ctx	*bi_crypt_context;
 #endif
 
-	union {
 #if defined(CONFIG_BLK_DEV_INTEGRITY)
-		struct bio_integrity_payload *bi_integrity; /* data integrity */
+	struct bio_integrity_payload *bi_integrity; /* data integrity */
 #endif
-	};
 
 	unsigned short		bi_vcnt;	/* how many bio_vec's */
 
Signature · 1 line
2.25.1
maintainer Applied
#2 lore raw
Quoted 4 lines · Kanchan Joshi

The union around bi_integrity field is pointless.
Remove it.

Applied, thanks!

[1/1] block: remove bogus union

      commit: 4208c562a27899212e8046080555e0f204e0579a

Best regards,

Signature · 1 line
Jens Axboe
#3 lore raw
In reply to Kanchan Joshi

Kanchan,

Quoted 1 line

The union around bi_integrity field is pointless. Remove it.

That's fine. It was a union to facilitate sharing the space in the struct with the original copy offload patch series.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering