From 12ca7104647e75a38c42eb48bc568dcd6a838db0 Mon Sep 17 00:00:00 2001 From: jsg Date: Sun, 7 Jul 2024 01:39:06 +0000 Subject: [PATCH] remove unused ufs_ihashlookup() ok mlarkin@ --- sys/ufs/ufs/ufs_extern.h | 3 +-- sys/ufs/ufs/ufs_ihash.c | 26 +------------------------- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/sys/ufs/ufs/ufs_extern.h b/sys/ufs/ufs/ufs_extern.h index 4b916977193..0a5cc52ad9d 100644 --- a/sys/ufs/ufs/ufs_extern.h +++ b/sys/ufs/ufs/ufs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_extern.h,v 1.40 2024/05/13 01:15:53 jsg Exp $ */ +/* $OpenBSD: ufs_extern.h,v 1.41 2024/07/07 01:39:06 jsg Exp $ */ /* $NetBSD: ufs_extern.h,v 1.5 1996/02/09 22:36:03 christos Exp $ */ /*- @@ -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 a/sys/ufs/ufs/ufs_ihash.c b/sys/ufs/ufs/ufs_ihash.c index c83da438fe1..758d9a8ed6e 100644 --- a/sys/ufs/ufs/ufs_ihash.c +++ b/sys/ufs/ufs/ufs_ihash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_ihash.c,v 1.26 2021/10/19 06:11:45 semarie Exp $ */ +/* $OpenBSD: ufs_ihash.c,v 1.27 2024/07/07 01:39:06 jsg Exp $ */ /* $NetBSD: ufs_ihash.c,v 1.3 1996/02/09 22:36:04 christos Exp $ */ /* @@ -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. -- 2.20.1