version 1.23, 2007/05/28 23:42:56 |
version 1.23.20.1, 2008/01/02 21:58:29 |
Line 116 ufs_ihashlookup(dev_t dev, ino_t inum) |
|
Line 116 ufs_ihashlookup(dev_t dev, ino_t inum) |
|
struct inode *ip; |
struct inode *ip; |
struct ihashhead *ipp; |
struct ihashhead *ipp; |
|
|
mutex_enter(&ufs_ihash_lock); |
KASSERT(mutex_owned(&ufs_ihash_lock)); |
|
|
ipp = &ihashtbl[INOHASH(dev, inum)]; |
ipp = &ihashtbl[INOHASH(dev, inum)]; |
LIST_FOREACH(ip, ipp, i_hash) { |
LIST_FOREACH(ip, ipp, i_hash) { |
if (inum == ip->i_number && dev == ip->i_dev) |
if (inum == ip->i_number && dev == ip->i_dev) |
break; |
break; |
} |
} |
mutex_exit(&ufs_ihash_lock); |
|
if (ip) |
if (ip) |
return (ITOV(ip)); |
return (ITOV(ip)); |
return (NULLVP); |
return (NULLVP); |
Line 148 ufs_ihashget(dev_t dev, ino_t inum, int |
|
Line 148 ufs_ihashget(dev_t dev, ino_t inum, int |
|
if (flags == 0) { |
if (flags == 0) { |
mutex_exit(&ufs_ihash_lock); |
mutex_exit(&ufs_ihash_lock); |
} else { |
} else { |
simple_lock(&vp->v_interlock); |
mutex_enter(&vp->v_interlock); |
mutex_exit(&ufs_ihash_lock); |
mutex_exit(&ufs_ihash_lock); |
if (vget(vp, flags | LK_INTERLOCK)) |
if (vget(vp, flags | LK_INTERLOCK)) |
goto loop; |
goto loop; |