]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-fix-linux22-20050310
authorDerrick Brashear <shadow@dementia.org>
Fri, 11 Mar 2005 04:37:16 +0000 (04:37 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 11 Mar 2005 04:37:16 +0000 (04:37 +0000)
fix accumulated linux 2.2 damage

(cherry picked from commit c41aa8245ed0b9847d40671fa72d34350a75a569)

src/afs/LINUX/osi_file.c
src/afs/LINUX/osi_misc.c
src/afs/LINUX/osi_module.c
src/afs/LINUX/osi_probe.c
src/afs/LINUX/osi_syscall.c
src/afs/LINUX/osi_vfsops.c
src/afs/afs_vcache.c

index 3564af43594e78f90bc242900ea5a5d375501b01..c567bfaa6fd2edf8073c7d5799d6225f6f4cdc5f 100644 (file)
@@ -13,7 +13,9 @@
 RCSID
     ("$Header$");
 
+#ifdef AFS_LINUX24_ENV
 #include "h/module.h" /* early to avoid printf->printk mapping */
+#endif
 #include "afs/sysincludes.h"   /* Standard vendor system headers */
 #include "afsincludes.h"       /* Afs-based standard headers */
 #include "afs/afs_stats.h"     /* afs statistics */
index 61b1ec72dc32886796b85367aef179ca7b60e5d6..c7ab17715463e8cfbf2d0931b036e39764cc4143 100644 (file)
@@ -415,7 +415,9 @@ osi_clear_inode(struct inode *ip)
     afs_InactiveVCache(vcp, credp);
     ObtainWriteLock(&vcp->lock, 504);
     ip->i_nlink = 0;           /* iput checks this after calling this routine. */
+#ifdef I_CLEAR
     ip->i_state = I_CLEAR;
+#endif
     ReleaseWriteLock(&vcp->lock);
     crfree(credp);
 }
index fc2ec7e459ee47c43974f0c69132f52c9f2943ad..84c1f19388c75f3bd05dc3639785ddbb7bd5d0b8 100644 (file)
@@ -102,6 +102,7 @@ static struct proc_dir_entry *openafs_procfs;
 static int ioctl32_done;
 #endif
 
+#ifdef AFS_LINUX24_ENV
 static int
 afsproc_init(void)
 {
@@ -135,6 +136,7 @@ afsproc_exit(void)
            unregister_ioctl32_conversion(VIOC_SYSCALL32);
 #endif
 }
+#endif
 
 extern asmlinkage long
 afs_syscall(long syscall, long parm1, long parm2, long parm3, long parm4);
@@ -223,7 +225,9 @@ init_module(void)
     if (e) return e;
     register_filesystem(&afs_fs_type);
     osi_sysctl_init();
+#ifdef AFS_LINUX24_ENV
     afsproc_init();
+#endif
 
     return 0;
 }
@@ -243,7 +247,9 @@ cleanup_module(void)
     osi_linux_free_inode_pages();      /* Invalidate all pages using AFS inodes. */
     osi_linux_free_afs_memory();
 
+#ifdef AFS_LINUX24_ENV
     afsproc_exit();
+#endif
     return;
 }
 
index 67e2b954d49ff48c731bd07dc74d9e1a77d516f6..e94886604fd29deef35d3b5335997ef8a8c6660e 100644 (file)
@@ -52,6 +52,7 @@
 #include <afsconfig.h>
 #include "afs/param.h"
 #endif
+#ifdef AFS_LINUX24_ENV
 #include <linux/module.h> /* early to avoid printf->printk mapping */
 #ifndef OSI_PROBE_STANDALONE
 #include "afs/sysincludes.h"
@@ -1224,3 +1225,4 @@ void osi_probe_exit(void) { }
 module_init(osi_probe_init);
 module_exit(osi_probe_exit);
 #endif
+#endif
index 582904814cc8a3a7c8a100d7c3d4175e72ed8fe9..e15dd2f2a139b56e292a00736f3a8367e50d4845 100644 (file)
@@ -17,7 +17,9 @@
 RCSID
     ("$Header$");
 
+#ifdef AFS_LINUX24_ENV
 #include <linux/module.h> /* early to avoid printf->printk mapping */
+#endif
 #include "afs/sysincludes.h"
 #include "afsincludes.h"
 #include "h/unistd.h"          /* For syscall numbers. */
index 2da99b0ad3578bad76e306e6aabf32b467fd2a94..defdc484d429faa48d01c31980415fa946be10d5 100644 (file)
@@ -369,7 +369,7 @@ afs_statfs(struct super_block *sbp, struct statfs *__statp, int size)
 #endif
 {
 #if !defined(AFS_LINUX24_ENV)
-    struct statfs stat;
+    struct statfs stat, *statp;
 
     if (size < sizeof(struct statfs))
        return;
index a94e5e5a755ba67c327cc7f8da5bc7fbc4130fbb..be1fc0bd045439354975c4d5de5ccb1d813310c0 100644 (file)
@@ -886,7 +886,9 @@ restart:
 #if defined(AFS_LINUX22_ENV)
     {
        struct inode *ip = AFSTOI(tvc);
+#if defined(AFS_LINUX24_ENV)
        struct address_space *mapping = &ip->i_data;
+#endif
 
 #if defined(AFS_LINUX26_ENV)
        inode_init_once(ip);