swap: Avoid ABI change in 4.13.12
authorBen Hutchings <ben@decadent.org.uk>
Sun, 12 Nov 2017 01:03:55 +0000 (01:03 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 16 Nov 2017 21:04:10 +0000 (21:04 +0000)
Commit 2628bd6fc052 "mm, swap: fix race between swap count
continuation operations" added a field to struct swap_info_struct.
swap_info_struct is always allocated in built-in code and modules
won't use this new field, so move it to the end of the structure and
hide it from genksyms.

Gbp-Pq: Topic debian
Gbp-Pq: Name swap-avoid-abi-change-in-4.13.12.patch

include/linux/swap.h

index a615eda102aeb98f0ae22b87613175a8949fbf6d..80eee5c3396b4181770f8a61084c1cc6d295fd09 100644 (file)
@@ -246,12 +246,14 @@ struct swap_info_struct {
                                         * both locks need hold, hold swap_lock
                                         * first.
                                         */
+       struct work_struct discard_work; /* discard worker */
+       struct swap_cluster_list discard_clusters; /* discard clusters list */
+#ifndef __GENKSYMS__
        spinlock_t cont_lock;           /*
                                         * protect swap count continuation page
                                         * list.
                                         */
-       struct work_struct discard_work; /* discard worker */
-       struct swap_cluster_list discard_clusters; /* discard clusters list */
+#endif
 };
 
 /* linux/mm/workingset.c */