Blob Blame History Raw
From: Jan Kara <jack@suse.cz>
Subject: mbcache: Fixup kABI of mb_cache_entry
References: bsc#1207653
Patch-mainline: Never, kABI

Fixup kABI due to conversion from a bitfield to atomic flags. This kABI
breakage is basically impossible to 100% fixup in a transparent way as it is
fundamental in fixing the problem. But as far as we know there are no out of
tree users of mbcache so let's just try and overlay new flags field over the
old bitfields and hope that the compiler will use the same bit numbers...

Signed-off-by: Jan Kara <jack@suse.cz>

---
 include/linux/mbcache.h |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/include/linux/mbcache.h
+++ b/include/linux/mbcache.h
@@ -23,7 +23,13 @@ struct mb_cache_entry {
 	atomic_t		e_refcnt;
 	/* Key in hash - stable during lifetime of the entry */
 	u32			e_key;
+#ifdef __GENKSYMS__
+	u32			e_referenced:1;
+	u32			e_reusable:1;
+	/* 4-byte hole here on 64-bit */
+#else
 	unsigned long		e_flags;
+#endif
 	/* Block number of hashed block - stable during lifetime of the entry */
 	sector_t		e_block;
 };