-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux 5.17 compat: detect complete_and_exit() rename
Linux 5.17 sees a rename from complete_and_exit() to kthread complete_and_exit() Upstream commit cead18552660702a4a46f58e65188fe5f36e9dfe ("exit: Rename complete_and_exit to kthread_complete_and_exit") Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12989 (cherry picked from commit a985657) Signed-off-by: Jonathon Fernyhough <[email protected]>
- Loading branch information
1 parent
6be5c7d
commit 021ac04
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
AC_DEFUN([ZFS_AC_KERNEL_KTHREAD], [ | ||
dnl # | ||
dnl # 5.17 API, | ||
dnl # cead18552660702a4a46f58e65188fe5f36e9dfe ("exit: Rename complete_and_exit to kthread_complete_and_exit") | ||
dnl # | ||
dnl # Also moves the definition from include/linux/kernel.h to include/linux/kthread.h | ||
dnl # | ||
AC_MSG_CHECKING([whether kthread_complete_and_exit() is available]) | ||
ZFS_LINUX_TEST_RESULT([kthread_complete_and_exit], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(SPL_KTHREAD_COMPLETE_AND_EXIT, kthread_complete_and_exit, [kthread_complete_and_exit() available]) | ||
], [ | ||
AC_MSG_RESULT(no) | ||
AC_DEFINE(SPL_KTHREAD_COMPLETE_AND_EXIT, complete_and_exit, [using complete_and_exit() instead]) | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_SRC_KTHREAD], [ | ||
ZFS_LINUX_TEST_SRC([kthread_complete_and_exit], [ | ||
#include <linux/kthread.h> | ||
], [ | ||
struct completion *completion = NULL; | ||
long code = 0; | ||
kthread_complete_and_exit(completion, code); | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters