[839] | 1 | =================================================================== |
---|
| 2 | RCS file: /cvs/openafs/acinclude.m4,v |
---|
| 3 | retrieving revision 1.114.2.101 |
---|
| 4 | retrieving revision 1.114.2.102 |
---|
| 5 | diff -u -r1.114.2.101 -r1.114.2.102 |
---|
| 6 | --- openafs/acinclude.m4 2008/06/03 02:54:34 1.114.2.101 |
---|
| 7 | +++ openafs/acinclude.m4 2008/06/09 03:39:42 1.114.2.102 |
---|
| 8 | @@ -600,6 +600,8 @@ |
---|
| 9 | |
---|
| 10 | LINUX_KBUILD_USES_EXTRA_CFLAGS |
---|
| 11 | LINUX_KERNEL_COMPILE_WORKS |
---|
| 12 | + LINUX_EXPORTS_FIND_TASK_BY_PID |
---|
| 13 | + LINUX_EXPORTS_PROC_ROOT_FS |
---|
| 14 | LINUX_HAVE_CURRENT_KERNEL_TIME |
---|
| 15 | LINUX_KMEM_CACHE_INIT |
---|
| 16 | LINUX_HAVE_KMEM_CACHE_T |
---|
| 17 | =================================================================== |
---|
| 18 | RCS file: /cvs/openafs/src/afs/LINUX/osi_groups.c,v |
---|
| 19 | retrieving revision 1.25.2.15 |
---|
| 20 | retrieving revision 1.25.2.16 |
---|
| 21 | diff -u -r1.25.2.15 -r1.25.2.16 |
---|
| 22 | --- openafs/src/afs/LINUX/osi_groups.c 2008/04/19 21:56:11 1.25.2.15 |
---|
| 23 | +++ openafs/src/afs/LINUX/osi_groups.c 2008/06/09 03:39:44 1.25.2.16 |
---|
| 24 | @@ -20,7 +20,7 @@ |
---|
| 25 | #endif |
---|
| 26 | |
---|
| 27 | RCSID |
---|
| 28 | - ("$Header: /cvs/openafs/src/afs/LINUX/osi_groups.c,v 1.25.2.15 2008/04/19 21:56:11 shadow Exp $"); |
---|
| 29 | + ("$Header: /cvs/openafs/src/afs/LINUX/osi_groups.c,v 1.25.2.16 2008/06/09 03:39:44 shadow Exp $"); |
---|
| 30 | |
---|
| 31 | #include "afs/sysincludes.h" |
---|
| 32 | #include "afsincludes.h" |
---|
| 33 | @@ -646,7 +646,11 @@ |
---|
| 34 | # endif |
---|
| 35 | rcu_read_lock(); |
---|
| 36 | # endif |
---|
| 37 | +#if defined(EXPORTED_FIND_TASK_BY_PID) |
---|
| 38 | p = find_task_by_pid(1); |
---|
| 39 | +#else |
---|
| 40 | + p = find_task_by_vpid(1); |
---|
| 41 | +#endif |
---|
| 42 | if (p && p->user->session_keyring) |
---|
| 43 | __key_type_keyring = p->user->session_keyring->type; |
---|
| 44 | # ifdef EXPORTED_TASKLIST_LOCK |
---|
| 45 | =================================================================== |
---|
| 46 | RCS file: /cvs/openafs/src/afs/LINUX/osi_module.c,v |
---|
| 47 | retrieving revision 1.52.2.29 |
---|
| 48 | retrieving revision 1.52.2.30 |
---|
| 49 | diff -u -r1.52.2.29 -r1.52.2.30 |
---|
| 50 | --- openafs/src/afs/LINUX/osi_module.c 2007/10/24 18:09:50 1.52.2.29 |
---|
| 51 | +++ openafs/src/afs/LINUX/osi_module.c 2008/06/09 03:39:44 1.52.2.30 |
---|
| 52 | @@ -15,7 +15,7 @@ |
---|
| 53 | #include "afs/param.h" |
---|
| 54 | |
---|
| 55 | RCSID |
---|
| 56 | - ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.29 2007/10/24 18:09:50 shadow Exp $"); |
---|
| 57 | + ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.30 2008/06/09 03:39:44 shadow Exp $"); |
---|
| 58 | |
---|
| 59 | #include <linux/module.h> /* early to avoid printf->printk mapping */ |
---|
| 60 | #include "afs/sysincludes.h" |
---|
| 61 | @@ -237,8 +237,16 @@ |
---|
| 62 | { |
---|
| 63 | struct proc_dir_entry *entry1; |
---|
| 64 | struct proc_dir_entry *entry2; |
---|
| 65 | +#if !defined(EXPORTED_PROC_ROOT_FS) |
---|
| 66 | + char path[64]; |
---|
| 67 | +#endif |
---|
| 68 | |
---|
| 69 | +#if defined(EXPORTED_PROC_ROOT_FS) |
---|
| 70 | openafs_procfs = proc_mkdir(PROC_FSDIRNAME, proc_root_fs); |
---|
| 71 | +#else |
---|
| 72 | + sprintf(path, "fs/%s", PROC_FSDIRNAME); |
---|
| 73 | + openafs_procfs = proc_mkdir(path, NULL); |
---|
| 74 | +#endif |
---|
| 75 | entry1 = create_proc_entry(PROC_SYSCALL_NAME, 0666, openafs_procfs); |
---|
| 76 | |
---|
| 77 | entry1->proc_fops = &afs_syscall_fops; |
---|
| 78 | @@ -263,9 +271,18 @@ |
---|
| 79 | static void |
---|
| 80 | afsproc_exit(void) |
---|
| 81 | { |
---|
| 82 | +#if !defined(EXPORTED_PROC_ROOT_FS) |
---|
| 83 | + char path[64]; |
---|
| 84 | +#endif |
---|
| 85 | + |
---|
| 86 | +#if defined(EXPORTED_PROC_ROOT_FS) |
---|
| 87 | + remove_proc_entry(PROC_FSDIRNAME, proc_root_fs); |
---|
| 88 | +#else |
---|
| 89 | + sprintf(path, "fs/%s", PROC_FSDIRNAME); |
---|
| 90 | + remove_proc_entry(path, NULL); |
---|
| 91 | +#endif |
---|
| 92 | remove_proc_entry(PROC_CELLSERVDB_NAME, openafs_procfs); |
---|
| 93 | remove_proc_entry(PROC_SYSCALL_NAME, openafs_procfs); |
---|
| 94 | - remove_proc_entry(PROC_FSDIRNAME, proc_root_fs); |
---|
| 95 | #if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL) |
---|
| 96 | if (ioctl32_done) |
---|
| 97 | unregister_ioctl32_conversion(VIOC_SYSCALL32); |
---|
| 98 | =================================================================== |
---|
| 99 | RCS file: /cvs/openafs/src/cf/linux-test4.m4,v |
---|
| 100 | retrieving revision 1.20.2.48 |
---|
| 101 | retrieving revision 1.20.2.49 |
---|
| 102 | diff -u -r1.20.2.48 -r1.20.2.49 |
---|
| 103 | --- openafs/src/cf/linux-test4.m4 2008/05/20 20:39:53 1.20.2.48 |
---|
| 104 | +++ openafs/src/cf/linux-test4.m4 2008/06/09 03:39:44 1.20.2.49 |
---|
| 105 | @@ -1005,3 +1005,30 @@ |
---|
| 106 | AC_DEFINE([EXPORTED_RCU_READ_LOCK], 1, [define if rcu_read_lock() is usable]) |
---|
| 107 | fi]) |
---|
| 108 | |
---|
| 109 | +AC_DEFUN([LINUX_EXPORTS_FIND_TASK_BY_PID], [ |
---|
| 110 | + AC_MSG_CHECKING([if find_task_by_pid is usable]) |
---|
| 111 | + AC_CACHE_VAL([ac_cv_linux_exports_find_task_by_pid], [ |
---|
| 112 | + AC_TRY_KBUILD( |
---|
| 113 | +[#include <linux/sched.h>], |
---|
| 114 | +[pid_t p; |
---|
| 115 | +find_task_by_pid(p);], |
---|
| 116 | + ac_cv_linux_exports_find_task_by_pid=yes, |
---|
| 117 | + ac_cv_linux_exports_find_task_by_pid=no)]) |
---|
| 118 | + AC_MSG_RESULT($ac_cv_linux_exports_find_task_by_pid) |
---|
| 119 | + if test "x$ac_cv_linux_exports_find_task_by_pid" = "xyes"; then |
---|
| 120 | + AC_DEFINE([EXPORTED_FIND_TASK_BY_PID], 1, [define if find_task_by_pid() is usable]) |
---|
| 121 | + fi]) |
---|
| 122 | + |
---|
| 123 | +AC_DEFUN([LINUX_EXPORTS_PROC_ROOT_FS], [ |
---|
| 124 | + AC_MSG_CHECKING([if proc_root_fs is defined and exported]) |
---|
| 125 | + AC_CACHE_VAL([ac_cv_linux_exports_proc_root_fs], [ |
---|
| 126 | + AC_TRY_KBUILD( |
---|
| 127 | +[#include <linux/proc_fs.h>], |
---|
| 128 | +[struct proc_dir_entry *p = proc_root_fs;], |
---|
| 129 | + ac_cv_linux_exports_proc_root_fs=yes, |
---|
| 130 | + ac_cv_linux_exports_proc_root_fs=no)]) |
---|
| 131 | + AC_MSG_RESULT($ac_cv_linux_exports_proc_root_fs) |
---|
| 132 | + if test "x$ac_cv_linux_exports_proc_root_fs" = "xyes"; then |
---|
| 133 | + AC_DEFINE([EXPORTED_PROC_ROOT_FS], 1, [define if proc_root_fs is exported]) |
---|
| 134 | + fi]) |
---|
| 135 | + |
---|