[BACK]Return to ufs_ihash.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / ufs / ufs

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/ufs/ufs/Attic/ufs_ihash.c between version 1.23 and 1.23.20.1

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;

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.23.20.1

CVSweb <webmaster@jp.NetBSD.org>