Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e8483f5 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

ANDROID: GKI: genhd.h: add Android ABI padding to some structures



Try to mitigate potential future driver core api changes by adding a
padding to struct hd_struct, struct blk_integrity, and struct gendisk.

Based on a change made to the RHEL/CENTOS 8 kernel.

Bug: 151154716
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I5d19bf942fbedc64f705f5d27ae629c57209df27
parent dbf01163
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include <linux/percpu-refcount.h>
#include <linux/uuid.h>
#include <linux/blk_types.h>
#include <linux/android_kabi.h>

#ifdef CONFIG_BLOCK

@@ -130,6 +131,11 @@ struct hd_struct {
#endif
	struct percpu_ref ref;
	struct rcu_work rcu_work;

	ANDROID_KABI_RESERVE(1);
	ANDROID_KABI_RESERVE(2);
	ANDROID_KABI_RESERVE(3);
	ANDROID_KABI_RESERVE(4);
};

#define GENHD_FL_REMOVABLE			1
@@ -167,6 +173,9 @@ struct blk_integrity {
	unsigned char				tuple_size;
	unsigned char				interval_exp;
	unsigned char				tag_size;

	ANDROID_KABI_RESERVE(1);
	ANDROID_KABI_RESERVE(2);
};

#endif	/* CONFIG_BLK_DEV_INTEGRITY */
@@ -211,6 +220,12 @@ struct gendisk {
	int node_id;
	struct badblocks *bb;
	struct lockdep_map lockdep_map;

	ANDROID_KABI_RESERVE(1);
	ANDROID_KABI_RESERVE(2);
	ANDROID_KABI_RESERVE(3);
	ANDROID_KABI_RESERVE(4);

};

static inline struct gendisk *part_to_disk(struct hd_struct *part)