From 840e7c74587073340cdfec24df4420fa887c42b7 Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 14 Feb 2005 20:51:39 +0000 Subject: - Remove the unused and unsafe ufs_ihashlookup. This function returned a vnode pointer that could not be used since no locks were held. Sponsored by: Isilon Systems, Inc. --- sys/ufs/ufs/ufs_extern.h | 2 -- sys/ufs/ufs/ufs_ihash.c | 22 ---------------------- 2 files changed, 24 deletions(-) (limited to 'sys/ufs') diff --git a/sys/ufs/ufs/ufs_extern.h b/sys/ufs/ufs/ufs_extern.h index 3c71d77..e6a7c42 100644 --- a/sys/ufs/ufs/ufs_extern.h +++ b/sys/ufs/ufs/ufs_extern.h @@ -74,8 +74,6 @@ int ufs_getlbns(struct vnode *, ufs2_daddr_t, struct indir *, int *); int ufs_ihashget(struct cdev *, ino_t, int, struct vnode **); void ufs_ihashinit(void); int ufs_ihashins(struct inode *, int, struct vnode **); -struct vnode * - ufs_ihashlookup(struct cdev *, ino_t); void ufs_ihashrem(struct inode *); void ufs_ihashuninit(void); int ufs_inactive(struct vop_inactive_args *); diff --git a/sys/ufs/ufs/ufs_ihash.c b/sys/ufs/ufs/ufs_ihash.c index 1ef9834..81c4e2e 100644 --- a/sys/ufs/ufs/ufs_ihash.c +++ b/sys/ufs/ufs/ufs_ihash.c @@ -79,28 +79,6 @@ ufs_ihashuninit() /* * 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, inum) - struct cdev *dev; - ino_t inum; -{ - struct inode *ip; - - mtx_lock(&ufs_ihash_mtx); - LIST_FOREACH(ip, INOHASH(dev, inum), i_hash) - if (inum == ip->i_number && dev == ip->i_dev) - break; - mtx_unlock(&ufs_ihash_mtx); - - 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. */ int -- cgit v1.1