From: Chas Williams Date: Wed, 10 Aug 2005 20:23:17 +0000 (+0000) Subject: STABLE14-refrigerator-20050809 X-Git-Tag: openafs-stable-1_4_0-rc1~20 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=db74ba09fb29942da1e6290d301fea5496e74da1;p=packages%2Fo%2Fopenafs.git STABLE14-refrigerator-20050809 FIXES 20728 refrigerator takes void starting in 2.6.13 (cherry picked from commit c9b0955360b34ab1f8775c5ccc55e77037e0d312) --- diff --git a/acinclude.m4 b/acinclude.m4 index 68c5660e8..5816c496b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -608,6 +608,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_RLIM LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE + LINUX_REFRIGERATOR LINUX_WHICH_MODULES if test "x$ac_cv_linux_config_modversions" = "xno" -o $AFS_SYSKVERS -ge 26; then AC_MSG_WARN([Cannot determine sys_call_table status. assuming it isn't exported]) diff --git a/src/afs/LINUX/osi_sleep.c b/src/afs/LINUX/osi_sleep.c index c0e4072bb..75df9c022 100644 --- a/src/afs/LINUX/osi_sleep.c +++ b/src/afs/LINUX/osi_sleep.c @@ -195,7 +195,11 @@ afs_osi_SleepSig(void *event) #ifdef AFS_LINUX26_ENV #ifdef CONFIG_PM if (current->flags & PF_FREEZE) +#ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE refrigerator(PF_FREEZE); +#else + refrigerator(); +#endif #endif #endif AFS_GLOCK(); @@ -279,7 +283,11 @@ osi_TimedSleep(char *event, afs_int32 ams, int aintok) #ifdef AFS_LINUX26_ENV #ifdef CONFIG_PM if (current->flags & PF_FREEZE) +#ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE refrigerator(PF_FREEZE); +#else + refrigerator(); +#endif #endif #endif diff --git a/src/cf/linux-test1.m4 b/src/cf/linux-test1.m4 index 3772ed670..6902d33f5 100644 --- a/src/cf/linux-test1.m4 +++ b/src/cf/linux-test1.m4 @@ -121,3 +121,22 @@ if test "x$ac_cv_linux_func_a_writepage_takes_writeback_control" = "xyes" ; then AC_DEFINE(AOP_WRITEPAGE_TAKES_WRITEBACK_CONTROL, 1, [define if your aops.writepage takes a struct writeback_control argument]) fi CPPFLAGS="$save_CPPFLAGS"]) + +AC_DEFUN([LINUX_REFRIGERATOR],[ +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" +AC_MSG_CHECKING(whether refrigerator takes PF_FREEZE) +AC_CACHE_VAL(ac_cv_linux_func_refrigerator_takes_pf_freeze, +[ +AC_TRY_COMPILE( +[#include ], +[ +refrigerator(PF_FREEZE); +], +ac_cv_linux_func_refrigerator_takes_pf_freeze=yes, +ac_cv_linux_func_refrigerator_takes_pf_freeze=no)]) +AC_MSG_RESULT($ac_cv_linux_func_refrigerator_takes_pf_freeze) +if test "x$ac_cv_linux_func_refrigerator_takes_pf_freeze" = "xyes" ; then +AC_DEFINE(LINUX_REFRIGERATOR_TAKES_PF_FREEZE, 1, [define if your refrigerator takes PF_FREEZE]) +fi +CPPFLAGS="$save_CPPFLAGS"])