X-Git-Url: http://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fafs%2FLINUX%2Fosi_pag_module.c;h=a315ec8fe93b4bc52ad9d6b0e6aa5c7e5106fdaa;hp=d0f73faee7126ae9cd23ed4b9456a1e43cd71e01;hb=109927bf6f54b58b76ac48ba41c2012c74937fed;hpb=b7cc8bf2850c5650a9e47416af8bd488f9be9161 diff --git a/src/afs/LINUX/osi_pag_module.c b/src/afs/LINUX/osi_pag_module.c index d0f73fa..a315ec8 100644 --- a/src/afs/LINUX/osi_pag_module.c +++ b/src/afs/LINUX/osi_pag_module.c @@ -29,11 +29,9 @@ #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) #include #include #include -#endif static unsigned long nfs_server_addr = 0; #if defined(module_param) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) @@ -51,27 +49,18 @@ MODULE_PARM(this_cell, "s"); #endif MODULE_PARM_DESC(this_cell, "Local cell name"); -#if defined(AFS_LINUX24_ENV) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) DEFINE_MUTEX(afs_global_lock); #else DECLARE_MUTEX(afs_global_lock); #endif struct proc_dir_entry *openafs_procfs; -#else -struct semaphore afs_global_lock = MUTEX; -#endif int afs_global_owner = 0; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) int __init afspag_init(void) -#else -int -init_module(void) -#endif { -#if !defined(EXPORTED_PROC_ROOT_FS) && defined(AFS_LINUX24_ENV) +#if !defined(EXPORTED_PROC_ROOT_FS) char path[64]; #endif int err; @@ -81,7 +70,6 @@ init_module(void) err = osi_syscall_init(); if (err) return err; -#ifdef AFS_LINUX24_ENV #if defined(EXPORTED_PROC_ROOT_FS) openafs_procfs = proc_mkdir(PROC_FSDIRNAME, proc_root_fs); #else @@ -89,7 +77,6 @@ init_module(void) openafs_procfs = proc_mkdir(path, NULL); #endif osi_ioctl_init(); -#endif afspag_Init(htonl(nfs_server_addr)); if (this_cell) @@ -98,22 +85,16 @@ init_module(void) return 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) void __exit afspag_cleanup(void) -#else -void -cleanup_module(void) -#endif { -#if !defined(EXPORTED_PROC_ROOT_FS) && defined(AFS_LINUX24_ENV) +#if !defined(EXPORTED_PROC_ROOT_FS) char path[64]; #endif osi_syscall_clean(); osi_linux_free_afs_memory(); -#ifdef AFS_LINUX24_ENV osi_ioctl_clean(); #if defined(EXPORTED_PROC_ROOT_FS) remove_proc_entry(PROC_FSDIRNAME, proc_root_fs); @@ -121,17 +102,13 @@ cleanup_module(void) sprintf(path, "fs/%s", PROC_FSDIRNAME); remove_proc_entry(path, NULL); #endif -#endif return; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) MODULE_LICENSE("http://www.openafs.org/dl/license10.html"); module_init(afspag_init); module_exit(afspag_cleanup); -#endif -#ifdef AFS_LINUX26_ENV /* Hack alert! * These will never be called in the standalone PAG manager, because * they are only referenced in afs_InitReq, and nothing calls that. @@ -152,4 +129,3 @@ afs_nfsclient_reqhandler(struct afs_exporter *exporter, { return EINVAL; } -#endif