OSDN Git Service

ANDROID: GKI: elevator: add Android ABI padding to some structures
authorGreg Kroah-Hartman <gregkh@google.com>
Wed, 22 Apr 2020 13:50:51 +0000 (15:50 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 1 May 2020 13:18:13 +0000 (15:18 +0200)
Try to mitigate potential future driver core api changes by adding a
padding to struct elevator_mq_ops and struct elevator_type.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia4c2667fd5ca9e6dd2e0d30b95a0f8d5eb7921dc

include/linux/elevator.h

index d10cc29..aa8e392 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <linux/percpu.h>
 #include <linux/hashtable.h>
+#include <linux/android_kabi.h>
 
 #ifdef CONFIG_BLOCK
 
@@ -120,6 +121,11 @@ struct elevator_mq_ops {
        void (*init_icq)(struct io_cq *);
        void (*exit_icq)(struct io_cq *);
        void (*elevator_registered_fn)(struct request_queue *q);
+
+       ANDROID_KABI_RESERVE(1);
+       ANDROID_KABI_RESERVE(2);
+       ANDROID_KABI_RESERVE(3);
+       ANDROID_KABI_RESERVE(4);
 };
 
 #define ELV_NAME_MAX   (16)
@@ -158,6 +164,9 @@ struct elevator_type
        /* managed by elevator core */
        char icq_cache_name[ELV_NAME_MAX + 6];  /* elvname + "_io_cq" */
        struct list_head list;
+
+       ANDROID_KABI_RESERVE(1);
+       ANDROID_KABI_RESERVE(2);
 };
 
 #define ELV_HASH_BITS 6