How about shaving some useless looking mallocs off? Here is a start,
saving 4K:


Index: isofs//cd9660/cd9660_node.c
===================================================================
RCS file: /home/vcs/cvs/openbsd/src/sys/isofs/cd9660/cd9660_node.c,v
retrieving revision 1.29
diff -u -p -r1.29 cd9660_node.c
--- isofs//cd9660/cd9660_node.c 14 Mar 2015 03:38:50 -0000      1.29
+++ isofs//cd9660/cd9660_node.c 27 Sep 2015 14:03:46 -0000
@@ -76,9 +76,7 @@ int
 cd9660_init(vfsp)
        struct vfsconf *vfsp;
 {
-
-       isohashtbl = hashinit(initialvnodes, M_ISOFSMNT, M_WAITOK, &isohash);
-       arc4random_buf(&isohashkey, sizeof(isohashkey));
+       isohashtbl = NULL;
        return (0);
 }
 
@@ -106,6 +104,9 @@ cd9660_ihashget(dev, inum)
        struct iso_node *ip;
        struct vnode *vp;
 
+       if (!isohashtbl)
+               return (NULL);
+
 loop:
        /* XXX locking lock hash list? */
        for (ip = isohashtbl[INOHASH(dev, inum)]; ip; ip = ip->i_next) {
@@ -129,6 +130,12 @@ cd9660_ihashins(ip)
        struct iso_node *ip;
 {
        struct iso_node **ipp, *iq;
+
+       if (!isohashtbl) {
+               isohashtbl =
+                   hashinit(initialvnodes, M_ISOFSMNT, M_WAITOK, &isohash);
+               arc4random_buf(&isohashkey, sizeof(isohashkey));
+       }
 
        /* XXX locking lock hash list? */
        ipp = &isohashtbl[INOHASH(ip->i_dev, ip->i_number)];

Reply via email to