Index | Thread | Search

From:
Jonathan Gray <jsg@jsg.id.au>
Subject:
remove ufs_ihashlookup()
To:
tech@openbsd.org
Date:
Thu, 4 Jul 2024 08:46:35 +1000

Download raw body.

Thread
unused

diff --git sys/ufs/ufs/ufs_extern.h sys/ufs/ufs/ufs_extern.h
index 4b916977193..977ee601739 100644
--- sys/ufs/ufs/ufs_extern.h
+++ sys/ufs/ufs/ufs_extern.h
@@ -97,7 +97,6 @@ int ufs_getlbns(struct vnode *, daddr_t, struct indir *, int *);
 
 /* ufs_ihash.c */
 void ufs_ihashinit(void);
-struct vnode *ufs_ihashlookup(dev_t, ufsino_t);
 struct vnode *ufs_ihashget(dev_t, ufsino_t);
 int ufs_ihashins(struct inode *);
 void ufs_ihashrem(struct inode *);
diff --git sys/ufs/ufs/ufs_ihash.c sys/ufs/ufs/ufs_ihash.c
index c83da438fe1..403225db813 100644
--- sys/ufs/ufs/ufs_ihash.c
+++ sys/ufs/ufs/ufs_ihash.c
@@ -75,30 +75,6 @@ ufs_ihashinit(void)
 	arc4random_buf(&ihashkey, sizeof(ihashkey));
 }
 
-/*
- * Use the device/inum pair to find the incore inode, and return a pointer
- * to it. If it is in core, return it, even if it is locked.
- */
-struct vnode *
-ufs_ihashlookup(dev_t dev, ufsino_t inum)
-{
-        struct inode *ip;
-	struct ihashhead *ipp;
-
-	/* XXXLOCKING lock hash list */
-	ipp = INOHASH(dev, inum);
-	LIST_FOREACH(ip, ipp, i_hash) {
-		if (inum == ip->i_number && dev == ip->i_dev)
-			break;
-	}
-	/* XXXLOCKING unlock hash list? */
-
-	if (ip)
-		return (ITOV(ip));
-
-	return (NULLVP);
-}
-
 /*
  * Use the device/inum pair to find the incore inode, and return a pointer
  * to it. If it is in core, but locked, wait for it.