HomeFreeBSD

Linux compat: fix DECLARE_EVENT_CLASS() test when ZFS is built-in

Description

Linux compat: fix DECLARE_EVENT_CLASS() test when ZFS is built-in

ZFS_LINUX_TRY_COMPILE_HEADER macro doesn't take CONFIG_ZFS=y into
account. As a result, on several latest Linux versions, configure
script marks DECLARE_EVENT_CLASS() available for non-GPL when ZFS
is being built as a module, but marks it unavailable when ZFS is
built-in.
Follow the logic of the neighbor macros and adjust
ZFS_LINUX_TRY_COMPILE_HEADER accordingly, so that it doesn't try
to look for a .ko when ZFS is built-in.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Closes #14006

Details

Provenance
Alexander <solbjorn@users.noreply.github.com>Authored on Oct 17 2022, 6:08 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 1 2022, 7:43 PM
Parents
rGdf000276b818: zfs_domount: fix double-disown of dataset / double-free of zfsvfs_t
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG3e767e34bda1: Linux compat: fix DECLARE_EVENT_CLASS() test when ZFS is built-in (authored by Alexander <solbjorn@users.noreply.github.com>).Nov 1 2022, 7:43 PM