From 887fa8f0597204c2354d87ba2a8114dd5a87ca16 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 29 Nov 2022 13:31:53 +0000 Subject: [PATCH] Revert "mtd: fix 'part' field data corruption in mtd_info" This reverts commit 6f2bf9c5ddfebdac7d002bc3cdde7fda22d2bf2a which is commit 37c5f9e80e015d0df17d0c377c18523002986851 upstream. It breaks the ABI and will be brought back later in an ABI-safe way. Bug: 161946584 Change-Id: Ia8f3f31c12c00cf304855fc77e033e7fd3b00498 Signed-off-by: Greg Kroah-Hartman --- include/linux/mtd/mtd.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index fc41fecfe44f..157357ec1441 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -388,8 +388,10 @@ struct mtd_info { /* List of partitions attached to this MTD device */ struct list_head partitions; - struct mtd_part part; - struct mtd_master master; + union { + struct mtd_part part; + struct mtd_master master; + }; }; static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd)