#include "afs/afs_stats.h"
#include "rx/rx_globals.h"
#if !defined(UKERNEL)
-# if !defined(AFS_LINUX_ENV)
+# if defined(AFS_LINUX_ENV)
+# include "osi_compat.h"
+# else
# include "net/if.h"
# ifdef AFS_SGI_ENV
# include "h/hashing.h"
sprintf(current->comm, "afs_callback");
afs_RXCallBackServer();
AFS_GUNLOCK();
- complete_and_exit(0, 0);
+ kthread_complete_and_exit(0, 0);
break;
case AFSOP_START_AFS:
sprintf(current->comm, "afs_afsstart");
sprintf(current->comm, "afsd");
afs_Daemon();
AFS_GUNLOCK();
- complete_and_exit(0, 0);
+ kthread_complete_and_exit(0, 0);
break;
case AFSOP_START_BKG:
#ifdef AFS_NEW_BKG
afs_BackgroundDaemon();
AFS_GUNLOCK();
#endif
- complete_and_exit(0, 0);
+ kthread_complete_and_exit(0, 0);
break;
case AFSOP_START_TRUNCDAEMON:
sprintf(current->comm, "afs_trimstart");
sprintf(current->comm, "afs_cachetrim");
afs_CacheTruncateDaemon();
AFS_GUNLOCK();
- complete_and_exit(0, 0);
+ kthread_complete_and_exit(0, 0);
break;
case AFSOP_START_CS:
sprintf(current->comm, "afs_checkserver");
complete(arg->complete);
afs_CheckServerDaemon();
AFS_GUNLOCK();
- complete_and_exit(0, 0);
+ kthread_complete_and_exit(0, 0);
break;
case AFSOP_RXEVENT_DAEMON:
sprintf(current->comm, "afs_evtstart");
sprintf(current->comm, "afs_rxevent");
afs_rxevent_daemon();
AFS_GUNLOCK();
- complete_and_exit(0, 0);
+ kthread_complete_and_exit(0, 0);
break;
#ifdef RXK_LISTENER_ENV
case AFSOP_RXLISTENER_DAEMON:
sprintf(current->comm, "afs_rxlistener");
rxk_Listener();
AFS_GUNLOCK();
- complete_and_exit(0, 0);
+ kthread_complete_and_exit(0, 0);
break;
#endif
default:
[#include <net/ip.h>],
[ip_sock_set_mtu_discover(NULL, 0);])
+dnl Linux 5.17 renamed complete_and_exit to kthread_complete_and_exit
+AC_CHECK_LINUX_FUNC([kthread_complete_and_exit],
+ [#include <linux/kernel.h>
+ #include <linux/kthread.h>],
+ [kthread_complete_and_exit(0, 0);])
+
dnl Consequences - things which get set as a result of the
dnl above tests
AS_IF([test "x$ac_cv_linux_func_d_alloc_anon" = "xno"],