]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-i386-user-mode-linux-support-20030513
authorKris Van Hees <kvanhees@sinenomine.net>
Fri, 30 May 2003 20:29:54 +0000 (20:29 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 30 May 2003 20:29:54 +0000 (20:29 +0000)
FIXES 1396

usermode linux support for 1.2.x

(cherry picked from commit fcdc120ce70a189ca7ed908688721b72ab3ffe77)

15 files changed:
.cvsignore
README
acinclude.m4
src/afs/LINUX/osi_alloc.c
src/afs/Makefile.in
src/config/Makefile.i386_umlinux22.in [new file with mode: 0644]
src/config/Makefile.i386_umlinux24.in [new file with mode: 0644]
src/config/afs_sysnames.h
src/config/param.i386_umlinux22.h [new file with mode: 0644]
src/config/param.i386_umlinux22_usr.h [new file with mode: 0644]
src/config/param.i386_umlinux24.h [new file with mode: 0644]
src/config/param.i386_umlinux24_usr.h [new file with mode: 0644]
src/libafs/MakefileProto.LINUX.in
src/lwp/Makefile.in
src/util/afs_lhash.c

index c2948c21e867f5d3444612764ae53d05eedceeae..4f075370cb6fd2ef8fca369113eedf5de7f65111 100644 (file)
@@ -9,6 +9,8 @@ hp_ux102
 hp_ux110
 i386_linux22
 i386_linux24
+i386_umlinux22
+i386_umlinux24
 include
 lib
 sgi_65
diff --git a/README b/README
index c3bf7103e024db23604316a185c5b1d16a7f174e..7ef295b2a87883a9e87357204f47882bc751c81f 100644 (file)
--- a/README
+++ b/README
@@ -36,6 +36,8 @@ A. Creating the proper directory structure.
              i386_fbsd46 (gmake is required to build for FreeBSD)
       i386_linux22
       i386_linux24 
+      i386_umlinux22
+      i386_umlinux24 
       rs_aix42
       sgi_65 (file server not tested)
       sun4_413 (No client support, no fileserver support, db servers only)
index 81ee1126cd91b91763fcd4f843754908524d97c5..7ed8e040db12a68ba3de6c898cb7bee73a6a36ec 100644 (file)
@@ -486,6 +486,11 @@ else
                        fi
                        _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
                        AFS_SYSNAME="$_AFS_SYSNAME"
+                       AFS_ISUML=`cat /proc/cpuinfo | awk '/^model name/ {print $[]4}'`
+                       if test "x${AFS_ISUML}" = "xUML"; then
+                        _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/linux/umlinux/`
+                       fi
+                       AFS_SYSNAME="$_AFS_SYSNAME"
                        ;;
        esac
         AC_MSG_RESULT($AFS_SYSNAME)
index a89a74d186acb7b7a6dc320a40a4aa77ebaf7fde..f2ba713f96f6055e4b3a9835f698312382ac5f3d 100644 (file)
@@ -188,7 +188,7 @@ hash_verify(size_t index, unsigned key, void *data)
     int memtype;
 
     memtype = MEMTYPE(lmp->chunk);
-#ifdef AFS_SPARC64_LINUX24_ENV
+#if defined(AFS_SPARC64_LINUX24_ENV) || defined(AFS_I386_UMLINUX20_ENV)
     if ((memtype == KM_TYPE) && (!VALID_PAGE(virt_to_page(lmp->chunk)))) {
        printf("osi_linux_verify_alloced_memory: address 0x%x outside range, index=%d, key=%d\n", lmp->chunk, index, key);
     }
index f4396dc41fe80ba2ecf06791d78021e30817e58a..986c26bcdcc2f9ed4ba56ae45670582f68ddbf1c 100644 (file)
@@ -50,7 +50,7 @@ kinstall: ${KERNELDIR}/afs AFS_component_version_number.c
                        gencat -m afszcm.cat afs_trace.msf ;; \
                sun*_4* ) \
                        /usr/etc/gencat afszcm.cat afs_trace.msf ;; \
-               *_linux* ) \
+               *_linux* | *_umlinux* ) \
                        gencat --new afszcm.cat afs_trace.msf ;; \
                ppc_darwin* | i386_fbsd*) \
                        echo No gencat for ${SYS_NAME} ;; \
diff --git a/src/config/Makefile.i386_umlinux22.in b/src/config/Makefile.i386_umlinux22.in
new file mode 100644 (file)
index 0000000..6f2b451
--- /dev/null
@@ -0,0 +1,52 @@
+# Copyright 2000, International Business Machines Corporation and others.
+# All Rights Reserved.
+# 
+# This software has been released under the terms of the IBM Public
+# License.  For details, see the LICENSE file in the top-level source
+# directory or online at http://www.openafs.org/dl/license10.html
+
+# Keep macros within each section in sorted order for clean diff displays.
+#
+# AFS_OSTYPE used to indicate suffixes and os specific subdirectories.
+AFS_OSTYPE = LINUX
+
+# Base directory for linux kernel source. Actually a prefix which is complete
+# when LINUX_VERS is appended to it.
+LINUX_SRCDIR = /usr/src/linux-
+# Default list of Linux kernels to build. Build will run only if all
+# can be built. To build a different set, specify LINUX_VERS to make.
+LINUX_VERS = @LINUX_VERSION@
+
+# compilation and link editor flags
+DBG=-g
+OPTMZ=-O2
+PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
+# Put -O2 here to _ensure_ all Makefiles pick it up.
+XCFLAGS= -O2
+MT_CFLAGS=-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}
+XLDFLAGS=
+SHLIB_LDFLAGS = -shared -Xlinker -x
+SHLIB_SUFFIX=so
+SHLIB_CFLAGS=
+SHLIB_LINKER=${MT_CC} -shared
+#
+# libraries
+MTLIBS=-lpthread
+TXLIBS= /usr/lib/libncurses.so
+XLIBS= @LIB_AFSDB@
+#
+# programs
+AR=ar
+AS=as
+CP=cp
+LD=ld   
+MT_CC=cc
+MV=mv
+RANLIB=ranlib
+RM=rm
+INSTALL=${TOP_SRCDIR}/pinstall/pinstall
+#
+# Other OS specific requirements
+#
+YACC = bison -y
+LEX = flex -l
diff --git a/src/config/Makefile.i386_umlinux24.in b/src/config/Makefile.i386_umlinux24.in
new file mode 100644 (file)
index 0000000..e905612
--- /dev/null
@@ -0,0 +1,44 @@
+# AFS_OSTYPE used to indicate suffixes and os specific subdirectories.
+AFS_OSTYPE = LINUX
+
+# Base directory for linux kernel source. Actually a prefix which is complete
+# when LINUX_VERS is appended to it.
+LINUX_SRCDIR = /usr/src/linux-
+# Default list of Linux kernels to build. Build will run only if all
+# can be built. To build a different set, specify LINUX_VERS to make.
+LINUX_VERS = @LINUX_VERSION@
+
+#
+# compilation and link editor flags
+DBG=-g
+OPTMZ=-O2
+PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
+# Put -O2 here to _ensure_ all Makefiles pick it up.
+XCFLAGS= -O2
+MT_CFLAGS=-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}
+XLDFLAGS=
+SHLIB_LDFLAGS = -shared -Xlinker -x
+SHLIB_SUFFIX=so
+SHLIB_CFLAGS=
+SHLIB_LINKER=${MT_CC} -shared
+#
+# libraries
+MTLIBS=-lpthread
+TXLIBS= /usr/lib/libncurses.so
+XLIBS= @LIB_AFSDB@
+#
+# programs
+AR=ar
+AS=as
+CP=cp
+LD=ld
+MT_CC=cc
+MV=mv
+RANLIB=ranlib
+RM=rm
+INSTALL=${TOP_SRCDIR}/pinstall/pinstall
+#
+# Other OS specific requirements
+#
+YACC = bison -y
+LEX = flex -l
index f3e8928fbab0aa396da8dab041e288f5e23f8862..330204aa0d206d1c91aefa0cd6fdc72c689f7b02 100644 (file)
@@ -7,6 +7,10 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
+#define SYS_NAME_ID_i386_umlinux2      2700
+#define SYS_NAME_ID_i386_umlinux22     2701
+#define SYS_NAME_ID_i386_umlinux24     2702
+
 /*
  * File: afs_sysnames.h
  *
diff --git a/src/config/param.i386_umlinux22.h b/src/config/param.i386_umlinux22.h
new file mode 100644 (file)
index 0000000..246071f
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ * 
+ * This software has been released under the terms of the IBM Public
+ * License.  For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define AFS_LINUX20_ENV                1
+#define AFS_LINUX22_ENV                1
+#define AFS_UMLINUX20_ENV      1
+#define AFS_UMLINUX22_ENV      1
+#define AFS_I386_LINUX20_ENV   1
+#define AFS_I386_LINUX22_ENV   1
+#define AFS_I386_UMLINUX20_ENV 1
+#define AFS_I386_UMLINUX22_ENV 1
+#define AFS_NONFSTRANS         1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1   /* User space interface to file system */
+
+#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+#include <linux/config.h>
+#ifdef CONFIG_SMP
+#undef CONFIG_SMP
+#endif
+/* Using "AFS_SMP" to map to however many #define's are required to get
+ * MP to compile for Linux
+ */
+#ifdef AFS_SMP
+#define CONFIG_SMP 1
+#ifndef CONFIG_X86_LOCAL_APIC
+#define CONFIG_X86_LOCAL_APIC 1
+#endif
+#ifndef __SMP__
+#define __SMP__
+#endif
+#define AFS_GLOBAL_SUNLOCK
+#endif
+
+#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
+#define MODVERSIONS
+#include <linux/modversions.h>
+#endif
+
+#endif /* __KERNEL__  && !DUMP_KERNEL*/
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS       2 /* Set to Userdisabled, allow sysctl to override */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME       "i386_umlinux22"
+#define SYS_NAME_ID    SYS_NAME_ID_i386_umlinux22
+#define AFSLITTLE_ENDIAN    1
+#define AFS_HAVE_FFS        1       /* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0  /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#endif /* AFS_PARAM_H */
diff --git a/src/config/param.i386_umlinux22_usr.h b/src/config/param.i386_umlinux22_usr.h
new file mode 100644 (file)
index 0000000..d2cf3c9
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ * 
+ * This software has been released under the terms of the IBM Public
+ * License.  For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define UKERNEL                        1       /* user space kernel */
+#define AFS_ENV                        1
+#define AFS_USR_LINUX20_ENV    1
+#define AFS_USR_LINUX22_ENV    1
+#define AFS_USR_UMLINUX20_ENV  1
+#define AFS_USR_UMLINUX22_ENV  1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1   /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME       "i386_umlinux22"
+#define SYS_NAME_ID    SYS_NAME_ID_i386_umlinux22
+#define AFSLITTLE_ENDIAN    1
+#define AFS_HAVE_FFS        1       /* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0  /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+
+#define        afsio_iov       uio_iov
+#define        afsio_iovcnt    uio_iovcnt
+#define        afsio_offset    uio_offset
+#define        afsio_seg       uio_segflg
+#define        afsio_fmode     uio_fmode
+#define        afsio_resid     uio_resid
+#define        AFS_UIOSYS      1
+#define        AFS_UIOUSER     UIO_USERSPACE
+#define        AFS_CLBYTES     MCLBYTES
+#define        AFS_MINCHANGE   2
+#define        VATTR_NULL      usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#endif /* AFS_PARAM_H */
diff --git a/src/config/param.i386_umlinux24.h b/src/config/param.i386_umlinux24.h
new file mode 100644 (file)
index 0000000..df3b8c8
--- /dev/null
@@ -0,0 +1,83 @@
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define AFS_LINUX20_ENV                1
+#define AFS_LINUX22_ENV                1
+#define AFS_LINUX24_ENV                1
+#define AFS_UMLINUX20_ENV      1
+#define AFS_UMLINUX22_ENV      1
+#define AFS_UMLINUX24_ENV      1
+#define AFS_I386_LINUX20_ENV   1
+#define AFS_I386_LINUX22_ENV   1
+#define AFS_I386_LINUX24_ENV   1
+#define AFS_I386_UMLINUX20_ENV 1
+#define AFS_I386_UMLINUX22_ENV 1
+#define AFS_I386_UMLINUX24_ENV 1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1   /* User space interface to file system */
+
+#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+#include <linux/threads.h>
+
+#include <linux/config.h>
+#ifdef CONFIG_SMP
+#undef CONFIG_SMP
+#endif
+/* Using "AFS_SMP" to map to however many #define's are required to get
+ * MP to compile for Linux
+ */
+#ifdef AFS_SMP
+#define CONFIG_SMP 1
+#ifndef CONFIG_X86_LOCAL_APIC
+#define CONFIG_X86_LOCAL_APIC 1
+#endif
+#ifndef __SMP__
+#define __SMP__
+#endif
+#define AFS_GLOBAL_SUNLOCK
+#endif
+
+#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
+#define MODVERSIONS
+#include <linux/modversions.h>
+#endif
+
+#endif /* __KERNEL__  && !DUMP_KERNEL*/
+
+#include <afs/afs_sysnames.h>
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS       2 /* Set to Userdisabled, allow sysctl to override */
+
+#define AFSLITTLE_ENDIAN    1
+#define AFS_HAVE_FFS        1       /* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0  /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+/* Machine / Operating system information */
+#define SYS_NAME       "i386_umlinux24"
+#define SYS_NAME_ID    SYS_NAME_ID_i386_umlinux24
+
+#endif /* AFS_PARAM_H */
+
+
diff --git a/src/config/param.i386_umlinux24_usr.h b/src/config/param.i386_umlinux24_usr.h
new file mode 100644 (file)
index 0000000..45b0edd
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define UKERNEL                        1       /* user space kernel */
+#define AFS_ENV                        1
+#define AFS_USR_LINUX20_ENV    1
+#define AFS_USR_LINUX22_ENV    1
+#define AFS_USR_LINUX24_ENV    1
+#define AFS_USR_UMLINUX20_ENV  1
+#define AFS_USR_UMLINUX22_ENV  1
+#define AFS_USR_UMLINUX24_ENV  1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1   /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME       "i386_umlinux24"
+#define SYS_NAME_ID    SYS_NAME_ID_i386_umlinux24
+#define AFSLITTLE_ENDIAN    1
+#define AFS_HAVE_FFS        1       /* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0  /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+
+#define        afsio_iov       uio_iov
+#define        afsio_iovcnt    uio_iovcnt
+#define        afsio_offset    uio_offset
+#define        afsio_seg       uio_segflg
+#define        afsio_fmode     uio_fmode
+#define        afsio_resid     uio_resid
+#define        AFS_UIOSYS      1
+#define        AFS_UIOUSER     UIO_USERSPACE
+#define        AFS_CLBYTES     MCLBYTES
+#define        AFS_MINCHANGE   2
+#define        VATTR_NULL      usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#endif /* AFS_PARAM_H */
index efde6935f90401a5179838280a8773d2ec3e9b38..910f3c5cda93c18ce4ebc91f1de1568e10308e89 100644 (file)
@@ -54,6 +54,10 @@ CC = gcc
 LD = ld
 GCC_KOPTS=@LINUX_GCC_KOPTS@
 # -Wall
+<i386_umlinux22 i386_umlinux24>
+P5PLUS=@P5PLUS_KOPTS@
+CCFLAGS =  $(KDEBUG) -O2 $(FOMIT) $(GCC_KOPTS) -pipe $(P5PLUS) -I/usr/src/linux/arch/um/include -I/usr/src/linux/arch/um/kernel/tt/include -I/usr/src/linux/arch/um/kernel/skas/include
+DEFINES = -D__KERNEL__  -DCPU=586 -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF} ${KDEFINES}
 <i386_linux22 i386_linux24>
 P5PLUS=@P5PLUS_KOPTS@
 CCFLAGS =  $(KDEBUG) -O2 $(FOMIT) $(GCC_KOPTS) -pipe $(P5PLUS)
@@ -143,6 +147,8 @@ ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
        ln -s ${LINUX_KERNEL_PATH}/include/asm-alpha asm
 <i386_linux22 i386_linux24>
        ln -s ${LINUX_KERNEL_PATH}/include/asm-i386 asm
+<i386_umlinux22 i386_umlinux24>
+       ln -s ${LINUX_KERNEL_PATH}/include/asm-um asm
 <amd64_linux24>
        ln -fs ${LINUX_KERNEL_PATH}/include/asm-x86_64 asm
 <s390_linux22 s390_linux24>
index 80f0dec17af52f65c98e96c5e48cd3683fd6955d..eaa044e7881d495a3eb7574bbb91123586a7c8ad 100644 (file)
@@ -73,7 +73,7 @@ process.o     : process.s process.c
                /usr/bin/cpp -P process.fbsd.s > process.ss; \
                ${AS} -o process.o process.ss; \
                $(RM) process.ss ;; \
-       hp* | *_linux* | sgi_64 | sgi_65 | ia64_hpux* ) \
+       hp* | *_linux* | *_umlinux* | sgi_64 | sgi_65 | ia64_hpux* ) \
                ${CC} ${CFLAGS} -c process.c;; \
        alpha_osf1 | alpha_osf20 |  alpha_osf30 | alpha_osf32 | alpha_osf32c | alpha_dux?? ) \
                ${AS} -v  -P -DOSF -I${TOP_INCDIR} -DASSEMBLER process.s; \
index 77feabeaf5211f97522384a1f6eec69d16086a3d..9caec331c0213e3e038b022a983cea16dbbb406a 100644 (file)
@@ -179,7 +179,7 @@ afs_lhash_expand(
        size_t old_address;     /* index of bucket to split */
        size_t new_address;     /* index of new bucket */
 
-       struct bucket *current; /* for scanning down old chain */
+       struct bucket *curr;    /* for scanning down old chain */
        struct bucket *previous;
 
        struct bucket *last_of_new;     /* last element in new chain */
@@ -216,36 +216,36 @@ afs_lhash_expand(
 
        /* relocate records to the new bucket */
 
-       current = lh->table[old_address];
+       curr = lh->table[old_address];
        previous = 0;
        last_of_new = 0;
        lh->table[new_address] = 0;
 
-       while (current) {
+       while (curr) {
                size_t addr;
-               addr = afs_lhash_address(lh, current->key);
+               addr = afs_lhash_address(lh, curr->key);
                if (addr == new_address) {
                        /* attach it to the end of the new chain */
                        if (last_of_new) {
-                               last_of_new->next = current;
+                               last_of_new->next = curr;
                        } else {
-                               lh->table[new_address] = current;
+                               lh->table[new_address] = curr;
                        }
                        if (previous) {
-                               previous->next = current->next;
+                               previous->next = curr->next;
                        } else {
-                               lh->table[old_address] = current->next;
+                               lh->table[old_address] = curr->next;
                        }
-                       last_of_new = current;
-                       current = current->next;
+                       last_of_new = curr;
+                       curr = curr->next;
                        last_of_new->next = 0;
                } else {
 #ifdef CHECK_INVARIANTS
                        assert(addr == old_address);
 #endif /* CHECK_INVARIANTS */
                        /* leave it on the old chain */
-                       previous = current;
-                       current = current->next;
+                       previous = curr;
+                       curr = curr->next;
                }
        }
 }
@@ -345,12 +345,12 @@ afs_lhash_iter(
 #endif /* CHECK_INVARIANTS */
 
        for (i = 0; i < lh->ltable; i++) {
-               struct bucket *current;
+               struct bucket *curr;
 
-               for (current = lh->table[i];
-                    current;
-                    current = current->next) {
-                       f(i, current->key, current->data);
+               for (curr = lh->table[i];
+                    curr;
+                    curr = curr->next) {
+                       f(i, curr->key, curr->data);
                }
        }
 }
@@ -364,16 +364,16 @@ afs_lhash_search(
 {
        size_t k;
        struct bucket *previous;
-       struct bucket *current;
+       struct bucket *curr;
 
        lh->search_calls++;
 
        k = afs_lhash_address(lh, key);
-       for (previous = 0, current = lh->table[k];
-            current;
-            previous = current, current = current->next) {
+       for (previous = 0, curr = lh->table[k];
+            curr;
+            previous = curr, curr = curr->next) {
                lh->search_tests++;
-               if (lh->equal(data, current->data)) {
+               if (lh->equal(data, curr->data)) {
 
                        /*
                         * Since we found what we were looking for, move
@@ -389,12 +389,12 @@ afs_lhash_search(
                         */
 
                        if (previous) {
-                               previous->next = current->next;
-                               current->next = lh->table[k];
-                               lh->table[k] = current;
+                               previous->next = curr->next;
+                               curr->next = lh->table[k];
+                               lh->table[k] = curr;
                        }
 
-                       return current->data;
+                       return curr->data;
                }
        }
 
@@ -409,14 +409,14 @@ afs_lhash_rosearch(
 )
 {
        size_t k;
-       struct bucket *current;
+       struct bucket *curr;
 
        k = afs_lhash_address(lh, key);
-       for (current = lh->table[k];
-            current;
-            current = current->next) {
-               if (lh->equal(data, current->data)) {
-                       return current->data;
+       for (curr = lh->table[k];
+            curr;
+            curr = curr->next) {
+               if (lh->equal(data, curr->data)) {
+                       return curr->data;
                }
        }