ret = fcache_get (&centry, dir, ce); if (ret) { ReleaseWriteLock (&centry->lock); return ret; }
ret = fcache_get (&centry, dir, ce); if (ret) return ret;  assert (CheckLock (&centry->lock) == -1);  ret = fcache_get_data (centry, ce); if (ret) { fcache_release (centry); return ret; }  ret = adir_lookup_fcacheentry (centry, name, file, ce);
adir_lookup (VenusFid dir,	     const char *name,	     VenusFid *file,	     CredCacheEntry *ce){     int fd;     DirPage0 *page0;     FCacheEntry *centry;     unsigned ind;     unsigned len;     int ret;     fbuf the_fbuf;     struct stat sb;     ret = fcache_get (&centry, dir, ce);     if (ret) {	 ReleaseWriteLock (&centry->lock);	 return ret;     }     ret = fcache_get_data (centry, ce);     if (ret) {	 ReleaseWriteLock (&centry->lock);	 return ret;     }     if (centry->status.FileType != TYPE_DIR) {	 ReleaseWriteLock (&centry->lock);	 return ENOTDIR;     }#if 0     len = centry->status.Length;#endif     fd = fcache_open_file (centry, O_RDONLY, 0);     if (fd < 0) {	 ReleaseWriteLock (&centry->lock);	 return errno;     }     if (fstat (fd, &sb)) {	 close (fd);	 ReleaseWriteLock (&centry->lock);	 return errno;     }     len = sb.st_size;     ret = fbuf_create (&the_fbuf, fd, len, FBUF_READ);     if (ret) {	 close (fd);	 ReleaseWriteLock (&centry->lock);	 return ret;     }     page0 = (DirPage0 *)(the_fbuf.buf);     ind = find_by_name (page0, name, file, &dir);     fbuf_end (&the_fbuf);     ReleaseWriteLock (&centry->lock);     if (ind != 0)	  return 0;     else	  return ENOENT;}