sched: exporting linux-rt migrate_disable for ZFS

From: Orivej Desh
Date: Tue Dec 08 2020 - 18:59:34 EST


Greetings!

(If you are receiving this again, that's because I'm sending from
another domain since my message from @gmx.fr was not forwarded to the
lists.)

With sched-Add-migrate_disable.patch first released in v5.9-rc8-rt14 [1]
linux-rt defines functions migrate_disable and migrate_enable.
They are used in linux headers in various macros and static inline
functions, and in particular in kmap_atomic and kunmap_atomic.
The latter are needed by ZFS which currently fails to build against
5.9-rt [2] because these functions are exported with EXPORT_SYMBOL_GPL.
Could you export them with EXPORT_SYMBOL instead?

I have checked that ZFS 2.0.0 builds and works with 5.9.1-rt20 (with
an additional fix [3]) with this patch:

--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1812 +1812 @@ void migrate_disable(void)
-EXPORT_SYMBOL_GPL(migrate_disable);
+EXPORT_SYMBOL(migrate_disable);
@@ -1843 +1843 @@ void migrate_enable(void)
-EXPORT_SYMBOL_GPL(migrate_enable);
+EXPORT_SYMBOL(migrate_enable);

[1] https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/diff/patches/0009-sched-Add-migrate_disable.patch?h=v5.9-rc8-rt14-patches&id=9a89bfdb3bc77aecdd0ff8cc69b595541c7b50c4
[2] https://github.com/openzfs/zfs/issues/11097#issuecomment-740682245
[3] https://github.com/openzfs/zfs/pull/11309