remove paranoid test; make hashsize a power of two (avoid unsigned
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Wed, 23 May 1984 02:18:26 +0000 (18:18 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Wed, 23 May 1984 02:18:26 +0000 (18:18 -0800)
modulo)

SCCS-vsn: sys/ufs/ffs/ffs_inode.c 6.4
SCCS-vsn: sys/ufs/ffs/ufs_inode.c 6.4
SCCS-vsn: sys/ufs/lfs/lfs_inode.c 6.4
SCCS-vsn: sys/ufs/ufs/ufs_inode.c 6.4

usr/src/sys/ufs/ffs/ffs_inode.c
usr/src/sys/ufs/ffs/ufs_inode.c
usr/src/sys/ufs/lfs/lfs_inode.c
usr/src/sys/ufs/ufs/ufs_inode.c

index 68f61a6..6e27fb9 100644 (file)
@@ -1,4 +1,4 @@
-/*     ffs_inode.c     6.3     84/02/15        */
+/*     ffs_inode.c     6.4     84/05/22        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -14,7 +14,7 @@
 #endif
 #include "../h/kernel.h"
 
 #endif
 #include "../h/kernel.h"
 
-#define        INOHSZ  63
+#define        INOHSZ  64
 #if    ((INOHSZ&(INOHSZ-1)) == 0)
 #define        INOHASH(dev,ino)        (((dev)+(ino))&(INOHSZ-1))
 #else
 #if    ((INOHSZ&(INOHSZ-1)) == 0)
 #define        INOHASH(dev,ino)        (((dev)+(ino))&(INOHSZ-1))
 #else
@@ -109,8 +109,6 @@ iget(dev, fs, ino)
        register struct inode *iq;
 
 loop:
        register struct inode *iq;
 
 loop:
-       if (getfs(dev) != fs)
-               panic("iget: bad fs");
        ih = &ihead[INOHASH(dev, ino)];
        for (ip = ih->ih_chain[0]; ip != (struct inode *)ih; ip = ip->i_forw)
                if (ino == ip->i_number && dev == ip->i_dev) {
        ih = &ihead[INOHASH(dev, ino)];
        for (ip = ih->ih_chain[0]; ip != (struct inode *)ih; ip = ip->i_forw)
                if (ino == ip->i_number && dev == ip->i_dev) {
index 3300e05..62bba73 100644 (file)
@@ -1,4 +1,4 @@
-/*     ufs_inode.c     6.3     84/02/15        */
+/*     ufs_inode.c     6.4     84/05/22        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -14,7 +14,7 @@
 #endif
 #include "../h/kernel.h"
 
 #endif
 #include "../h/kernel.h"
 
-#define        INOHSZ  63
+#define        INOHSZ  64
 #if    ((INOHSZ&(INOHSZ-1)) == 0)
 #define        INOHASH(dev,ino)        (((dev)+(ino))&(INOHSZ-1))
 #else
 #if    ((INOHSZ&(INOHSZ-1)) == 0)
 #define        INOHASH(dev,ino)        (((dev)+(ino))&(INOHSZ-1))
 #else
@@ -109,8 +109,6 @@ iget(dev, fs, ino)
        register struct inode *iq;
 
 loop:
        register struct inode *iq;
 
 loop:
-       if (getfs(dev) != fs)
-               panic("iget: bad fs");
        ih = &ihead[INOHASH(dev, ino)];
        for (ip = ih->ih_chain[0]; ip != (struct inode *)ih; ip = ip->i_forw)
                if (ino == ip->i_number && dev == ip->i_dev) {
        ih = &ihead[INOHASH(dev, ino)];
        for (ip = ih->ih_chain[0]; ip != (struct inode *)ih; ip = ip->i_forw)
                if (ino == ip->i_number && dev == ip->i_dev) {
index cf21ad5..23d559e 100644 (file)
@@ -1,4 +1,4 @@
-/*     lfs_inode.c     6.3     84/02/15        */
+/*     lfs_inode.c     6.4     84/05/22        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -14,7 +14,7 @@
 #endif
 #include "../h/kernel.h"
 
 #endif
 #include "../h/kernel.h"
 
-#define        INOHSZ  63
+#define        INOHSZ  64
 #if    ((INOHSZ&(INOHSZ-1)) == 0)
 #define        INOHASH(dev,ino)        (((dev)+(ino))&(INOHSZ-1))
 #else
 #if    ((INOHSZ&(INOHSZ-1)) == 0)
 #define        INOHASH(dev,ino)        (((dev)+(ino))&(INOHSZ-1))
 #else
@@ -109,8 +109,6 @@ iget(dev, fs, ino)
        register struct inode *iq;
 
 loop:
        register struct inode *iq;
 
 loop:
-       if (getfs(dev) != fs)
-               panic("iget: bad fs");
        ih = &ihead[INOHASH(dev, ino)];
        for (ip = ih->ih_chain[0]; ip != (struct inode *)ih; ip = ip->i_forw)
                if (ino == ip->i_number && dev == ip->i_dev) {
        ih = &ihead[INOHASH(dev, ino)];
        for (ip = ih->ih_chain[0]; ip != (struct inode *)ih; ip = ip->i_forw)
                if (ino == ip->i_number && dev == ip->i_dev) {
index 3300e05..62bba73 100644 (file)
@@ -1,4 +1,4 @@
-/*     ufs_inode.c     6.3     84/02/15        */
+/*     ufs_inode.c     6.4     84/05/22        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -14,7 +14,7 @@
 #endif
 #include "../h/kernel.h"
 
 #endif
 #include "../h/kernel.h"
 
-#define        INOHSZ  63
+#define        INOHSZ  64
 #if    ((INOHSZ&(INOHSZ-1)) == 0)
 #define        INOHASH(dev,ino)        (((dev)+(ino))&(INOHSZ-1))
 #else
 #if    ((INOHSZ&(INOHSZ-1)) == 0)
 #define        INOHASH(dev,ino)        (((dev)+(ino))&(INOHSZ-1))
 #else
@@ -109,8 +109,6 @@ iget(dev, fs, ino)
        register struct inode *iq;
 
 loop:
        register struct inode *iq;
 
 loop:
-       if (getfs(dev) != fs)
-               panic("iget: bad fs");
        ih = &ihead[INOHASH(dev, ino)];
        for (ip = ih->ih_chain[0]; ip != (struct inode *)ih; ip = ip->i_forw)
                if (ino == ip->i_number && dev == ip->i_dev) {
        ih = &ihead[INOHASH(dev, ino)];
        for (ip = ih->ih_chain[0]; ip != (struct inode *)ih; ip = ip->i_forw)
                if (ino == ip->i_number && dev == ip->i_dev) {