From: Marc Dionne Date: Tue, 12 Jun 2007 06:44:00 +0000 (+0000) Subject: DEVEL15-linux-2-6-22-updates-20070611 X-Git-Tag: openafs-devel-1_5_21~72 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=db8553387df38a71cc0eb7bc632ce41978c116b3 DEVEL15-linux-2-6-22-updates-20070611 FIXES 61767 1 - task_struct loses thread_info, which is now accessible through the task_thread_info() macro. A configure test is added to deal with this. 2 - the SLAB_CTOR_VERIFY flag is gone (cherry picked from commit 37a0b14e016af74176d714cc1b25a2af00275d56) --- diff --git a/acinclude.m4 b/acinclude.m4 index 5122637..71d3aee 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -643,6 +643,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TGID LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TODO + LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_THREAD_INFO LINUX_EXPORTS_TASKLIST_LOCK LINUX_GET_SB_HAS_STRUCT_VFSMOUNT LINUX_STATFS_TAKES_DENTRY @@ -832,6 +833,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) if test "x$ac_cv_linux_sched_struct_task_struct_has_todo" = "xyes"; then AC_DEFINE(STRUCT_TASK_STRUCT_HAS_TODO, 1, [define if your struct task_struct has todo]) fi + if test "x$ac_cv_linux_sched_struct_task_struct_has_thread_info" = "xyes"; then + AC_DEFINE(STRUCT_TASK_STRUCT_HAS_THREAD_INFO, 1, [define if your struct task_struct has thread_info]) + fi if test "x$ac_cv_linux_get_sb_has_struct_vfsmount" = "xyes"; then AC_DEFINE(GET_SB_HAS_STRUCT_VFSMOUNT, 1, [define if your get_sb_nodev needs a struct vfsmount argument]) fi diff --git a/src/afs/LINUX/osi_sleep.c b/src/afs/LINUX/osi_sleep.c index 5626292..ed81e51 100644 --- a/src/afs/LINUX/osi_sleep.c +++ b/src/afs/LINUX/osi_sleep.c @@ -205,7 +205,11 @@ afs_osi_SleepSig(void *event) #if defined(STRUCT_TASK_STRUCT_HAS_TODO) !current->todo #else +#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO) test_ti_thread_flag(current->thread_info, TIF_FREEZE) +#else + test_ti_thread_flag(task_thread_info(current), TIF_FREEZE) +#endif #endif #endif ) @@ -303,7 +307,11 @@ osi_TimedSleep(char *event, afs_int32 ams, int aintok) #if defined(STRUCT_TASK_STRUCT_HAS_TODO) !current->todo #else +#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO) test_ti_thread_flag(current->thread_info, TIF_FREEZE) +#else + test_ti_thread_flag(task_thread_info(current), TIF_FREEZE) +#endif #endif #endif ) diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c index 64699d1..048a46b 100644 --- a/src/afs/LINUX/osi_vfsops.c +++ b/src/afs/LINUX/osi_vfsops.c @@ -298,8 +298,10 @@ init_once(void * foo, kmem_cache_t * cachep, unsigned long flags) { struct vcache *vcp = (struct vcache *) foo; +#if defined(SLAB_CTOR_VERIFY) if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == SLAB_CTOR_CONSTRUCTOR) +#endif inode_init_once(AFSTOV(vcp)); } diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index 44a3679..099d3c7 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -444,6 +444,18 @@ printk("%d\n", _tsk.exit_state);], AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_exit_state)]) +AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_THREAD_INFO], [ + AC_MSG_CHECKING([for thread_info in struct task_struct]) + AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_thread_info], [ + AC_TRY_KBUILD( +[#include ], +[struct task_struct _tsk; +printk("%d\n", _tsk.thread_info);], + ac_cv_linux_sched_struct_task_struct_has_thread_info=yes, + ac_cv_linux_sched_struct_task_struct_has_thread_info=no)]) + AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_thread_info)]) + + AC_DEFUN([LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE], [ AC_MSG_CHECKING([for alloc_inode in struct super_operations]) AC_CACHE_VAL([ac_cv_linux_fs_struct_super_has_alloc_inode], [ diff --git a/src/rx/LINUX/rx_kmutex.c b/src/rx/LINUX/rx_kmutex.c index a4c863f..0385c5f 100644 --- a/src/rx/LINUX/rx_kmutex.c +++ b/src/rx/LINUX/rx_kmutex.c @@ -122,7 +122,11 @@ afs_cv_wait(afs_kcondvar_t * cv, afs_kmutex_t * l, int sigok) #if defined(STRUCT_TASK_STRUCT_HAS_TODO) !current->todo #else +#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO) test_ti_thread_flag(current->thread_info, TIF_FREEZE) +#else + test_ti_thread_flag(task_thread_info(current), TIF_FREEZE) +#endif #endif #endif ) diff --git a/src/rx/LINUX/rx_knet.c b/src/rx/LINUX/rx_knet.c index f1b3667..9d3b4ad 100644 --- a/src/rx/LINUX/rx_knet.c +++ b/src/rx/LINUX/rx_knet.c @@ -173,7 +173,11 @@ osi_NetReceive(osi_socket so, struct sockaddr_in *from, struct iovec *iov, #if defined(STRUCT_TASK_STRUCT_HAS_TODO) !current->todo #else +#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO) test_ti_thread_flag(current->thread_info, TIF_FREEZE) +#else + test_ti_thread_flag(task_thread_info(current), TIF_FREEZE) +#endif #endif #endif )