summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3d10164)
Since Linux 5.7, kallsyms_lookup_name() is no longer exported, so we
cannot rely on it.
So test for this, and when not available provide a fallback which just
returns NULL.
As this was the only way to access apply_workqueue_attrs() in recent
kernels, we need to cope with the absence of that function.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I09cc00047ec163a9395c5acd415505a8586e4e99
Reviewed-on: https://review.whamcloud.com/40826
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
]) # LIBCFS_CACHE_DETAIL_WRITERS
#
]) # LIBCFS_CACHE_DETAIL_WRITERS
#
+# LIBCFS_KALLSYMS_LOOKUP
+#
+# kernel v5.6-11591-g0bd476e6c671
+# kallsyms: unexport kallsyms_lookup_name() and kallsyms_on_each_symbol()
+AC_DEFUN([LIBCFS_KALLSYMS_LOOKUP], [
+LB_CHECK_EXPORT([kallsyms_lookup_name], [kernel/kallsyms.c],
+ [AC_DEFINE(HAVE_KALLSYMS_LOOKUP_NAME, 1,
+ [kallsyms_lookup_name is exported by kernel])])
+]) # LIBCFS_KALLSYMS_LOOKUP
+
+#
# LIBCFS_VMALLOC_2ARGS
#
# kernel v5.8-rc1~201^2~19
# LIBCFS_VMALLOC_2ARGS
#
# kernel v5.8-rc1~201^2~19
LIBCFS_FORCE_SIG_WITH_TASK
LIBCFS_CACHE_DETAIL_WRITERS
LIBCFS_HAVE_NR_UNSTABLE_NFS
LIBCFS_FORCE_SIG_WITH_TASK
LIBCFS_CACHE_DETAIL_WRITERS
LIBCFS_HAVE_NR_UNSTABLE_NFS
+# 5.7
+LIBCFS_KALLSYMS_LOOKUP
# 5.8
LIBCFS_HAVE_MMAP_LOCK
LIBCFS_KERNEL_SETSOCKOPT
# 5.8
LIBCFS_HAVE_MMAP_LOCK
LIBCFS_KERNEL_SETSOCKOPT
#define sizeof_field(type, member) FIELD_SIZEOF(type, member)
#endif
#define sizeof_field(type, member) FIELD_SIZEOF(type, member)
#endif
+#ifndef HAVE_KALLSYMS_LOOKUP_NAME
+static inline void *kallsyms_lookup_name(char *func)
+{
+ return NULL;
+}
+#endif
+
#endif /* __LIBCFS_LINUX_MISC_H__ */
#endif /* __LIBCFS_LINUX_MISC_H__ */
int cfs_apply_workqueue_attrs(struct workqueue_struct *wq,
const struct workqueue_attrs *attrs)
{
int cfs_apply_workqueue_attrs(struct workqueue_struct *wq,
const struct workqueue_attrs *attrs)
{
- return cfs_apply_workqueue_attrs_t(wq, attrs);
+ if (cfs_apply_workqueue_attrs_t)
+ return cfs_apply_workqueue_attrs_t(wq, attrs);
+ return 0;
}
EXPORT_SYMBOL_GPL(cfs_apply_workqueue_attrs);
}
EXPORT_SYMBOL_GPL(cfs_apply_workqueue_attrs);