- 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.
This commit is contained in:
parent
59284d27d7
commit
a8127ebb5d
@ -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 *);
|
||||
|
@ -77,28 +77,6 @@ ufs_ihashuninit()
|
||||
mtx_destroy(&ufs_ihash_mtx);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
Loading…
Reference in New Issue
Block a user