ReleaseWriteLock (&entry->lock);
fcache_release(entry);
newwalk (VenusFid *startdir, char *fname){     VenusFid cwd = *startdir;     char *base;     VenusFid file;     Result ret;     FCacheEntry *entry;     int error;     char symlink[MAXPATHLEN];     char store_name[MAXPATHLEN];     strcpy(store_name, fname);     fname = store_name;     do {        /* set things up so that fname points to the remainder of the path,         * whereas base points to the whatever preceeds the first /         */        base = fname;        fname = strchr(fname, '/');        if (fname) {            /* deal with repeated adjacent / chars by eliminating the             * duplicates.              */            while (*fname == '/') {                *fname = '\0';                fname++;            }        }         /* deal with absolute pathnames first. */        if (*base == '\0') {            cwd = rootcwd;            if (fname) {                if (strncmp("afs",fname,3) == 0) {                    fname += 3;                }                continue;            } else {                break;            }	 }	 ret = cm_lookup (cwd, base, &file, &tmpce);	 if (ret.res) {	     arla_warn (ADEBWARN, ret.error, "lookup(%s)", base);	     return -1;	 }	 error = fcache_get (&entry, file, tmpce);	 if (error) {	     arla_warn (ADEBWARN, error, "fcache_get");	     return -1;	 }	 error = fcache_get_data (entry, tmpce);	 if (error) {	     ReleaseWriteLock (&entry->lock);	     arla_warn (ADEBWARN, error, "fcache_get_data");	     return -1;	 }	 /* handle symlinks here */	 if (entry->status.FileType == TYPE_LINK) {	     int len;	     int fd;	     fd = fcache_open_file (entry, O_RDONLY, 0);	     /* read the symlink and null-terminate it */	     if (fd < 0) {		 ReleaseWriteLock(&entry->lock);		 arla_warn (ADEBWARN, errno, "fcache_open_file");		 return -1;	     }	     len = read (fd, symlink, sizeof(symlink));	     close (fd);	     if (len <= 0) {		 ReleaseWriteLock(&entry->lock);		 arla_warnx (ADEBWARN, "cannot read symlink");		 return -1;	     }	     symlink[len] = '\0';	     /* if we're not at the end (i.e. fname is not null), take	      * the expansion of the symlink and append fname to it.	      */	     if (fname != NULL) {		 strcat (symlink, "/");		 strcat (symlink, fname);	     }	     strcpy(store_name,symlink);	     fname = store_name;	 } else {	     /* if not a symlink, just update cwd */	     cwd = file;	 }	 ReleaseWriteLock (&entry->lock);	 /* the *fname condition below deals with a trailing / in a	  * path-name */     } while (fname != NULL && *fname);     *startdir = cwd;     return 0;}