ret.res = entry->inode;
ret.res    = 0; ret.error  = 0;
cm_open (VenusFid fid, CredCacheEntry* ce, u_int tokens){     FCacheEntry *entry;     Result ret;     u_long mask;     int error;     error = fcache_get (&entry, fid, ce);     if (error) {	 ret.res = -1;	 ret.error = error;	 return ret;     }     assert (CheckLock (&entry->lock) == -1);     error = fcache_get_data (entry, ce);     if(error) {	 ReleaseWriteLock (&entry->lock);	 ret.res = -1;	 ret.error = error;	 return ret;     }     switch(tokens) {     case XFS_DATA_R:       /*     case XFS_OPEN_NR:     case XFS_OPEN_SR: */	  mask = AREAD;	  break;     case XFS_DATA_W:	  mask = AWRITE;	  break;     case XFS_OPEN_NW:	  mask = AREAD | AWRITE;	  break;     default:	 arla_warnx (ADEBCM, "cm_open(): unknown token: %d, assuming AREAD",		     tokens);	 mask = AREAD;/*	  assert(FALSE); */     }     if (checkright (entry, mask, ce)) {	  ret.res = entry->inode;	  entry->flags.datausedp = TRUE;	  entry->tokens |= tokens;	  ret.res = entry->inode;	  ret.tokens = entry->tokens;	  log_operation ("open (%ld,%lu,%lu,%lu) %u\n",		   fid.Cell, fid.fid.Volume, fid.fid.Vnode, fid.fid.Unique,		   mask);     } else {	  ret.res = -1;	  ret.error = EACCES;     }     ReleaseWriteLock (&entry->lock);     return ret;}