hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I905SE CVE: NA
--------------------------------
Add kabi slots in dax_* struct for future expansion.
struct size(byte) reserve(8*byte) now(byte) dax_device 768 8 832 dax_operations 32 4 64 dax_holder_operations 8 3 32
Signed-off-by: Long Li leo.lilong@huawei.com --- drivers/dax/super.c | 10 ++++++++++ include/linux/dax.h | 10 ++++++++++ 2 files changed, 20 insertions(+)
diff --git a/drivers/dax/super.c b/drivers/dax/super.c index 0da9232ea175..34109d40fc50 100644 --- a/drivers/dax/super.c +++ b/drivers/dax/super.c @@ -2,6 +2,7 @@ /* * Copyright(c) 2017 Intel Corporation. All rights reserved. */ +#include <linux/kabi.h> #include <linux/pagemap.h> #include <linux/module.h> #include <linux/mount.h> @@ -33,6 +34,15 @@ struct dax_device { const struct dax_operations *ops; void *holder_data; const struct dax_holder_operations *holder_ops; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
static dev_t dax_devt; diff --git a/include/linux/dax.h b/include/linux/dax.h index 22cd9902345d..20e375897733 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h @@ -2,6 +2,7 @@ #ifndef _LINUX_DAX_H #define _LINUX_DAX_H
+#include <linux/kabi.h> #include <linux/fs.h> #include <linux/mm.h> #include <linux/radix-tree.h> @@ -41,6 +42,11 @@ struct dax_operations { */ size_t (*recovery_write)(struct dax_device *dax_dev, pgoff_t pgoff, void *addr, size_t bytes, struct iov_iter *iter); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
struct dax_holder_operations { @@ -53,6 +59,10 @@ struct dax_holder_operations { */ int (*notify_failure)(struct dax_device *dax_dev, u64 offset, u64 len, int mf_flags); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) };
#if IS_ENABLED(CONFIG_DAX)