ret = RXAFS_CreateFile (conn->connection, &dir_entry->fid.fid, name, store_attr, &OutFid, fetch_attr, &status, &callback, &volsync); if (ret) { arla_warn (ADEBFCACHE, ret, "CreateFile"); goto out;
host = rx_HostOf (rx_PeerOf (conn->connection));  ret = RXAFS_CreateFile (conn->connection, &dir_entry->fid.fid, name, store_attr, &OutFid, fetch_attr, &status, &callback, &volsync); if (ret == RX_CALL_DEAD) { continue; } else if (ret) { free_fs_server_context (&context); arla_warn (ADEBFCACHE, ret, "CreateFile"); goto out; } break; } free_fs_server_context (&context);  if (conn == NULL) return ENETDOWN;  status.Length = dir_entry->status.Length; update_entry (dir_entry, &status, &callback, &volsync, host, ce->cred); } else { static int fakefid = 100;  OutFid.Volume = dir_entry->fid.fid.Volume; OutFid.Vnode  = fakefid; OutFid.Unique = fakefid; ++fakefid;  fetch_attr->ClientModTime    = store_attr->ClientModTime; fetch_attr->Owner            = store_attr->Owner; fetch_attr->Group            = store_attr->Group; fetch_attr->UnixModeBits     = store_attr->UnixModeBits; fetch_attr->SegSize          = store_attr->SegSize; fetch_attr->ServerModTime    = store_attr->ClientModTime; fetch_attr->FileType         = TYPE_FILE; fetch_attr->DataVersion      = 1; fetch_attr->InterfaceVersion = 1; fetch_attr->Author           = fetch_attr->Owner; fetch_attr->LinkCount        = 1; fetch_attr->SyncCount        = 0; fetch_attr->spare1           = 0; fetch_attr->spare2           = 0; fetch_attr->spare3           = 0; fetch_attr->spare4           = 0; fetch_attr->ParentVnode      = dir_entry->fid.fid.Vnode; fetch_attr->ParentUnique     = dir_entry->fid.fid.Unique; fetch_attr->CallerAccess     = dir_entry->status.CallerAccess; fetch_attr->AnonymousAccess  = dir_entry->status.AnonymousAccess;
create_file (FCacheEntry *dir_entry,	     const char *name, AFSStoreStatus *store_attr,	     VenusFid *child_fid, AFSFetchStatus *fetch_attr,	     CredCacheEntry *ce){    int ret = 0;    ConnCacheEntry *conn;    AFSFid OutFid;    FCacheEntry *child_entry;    AFSFetchStatus status;    AFSCallBack callback;    AFSVolSync volsync;    int fd;    assert (CheckLock(&dir_entry->lock) == -1);    conn = findconn (dir_entry, ce);    if (conn == NULL)	return ENETDOWN;    ret = RXAFS_CreateFile (conn->connection,			    &dir_entry->fid.fid,			    name,			    store_attr,			    &OutFid,			    fetch_attr,			    &status,			    &callback,			    &volsync);    if (ret) {	arla_warn (ADEBFCACHE, ret, "CreateFile");	goto out;    }    update_entry (dir_entry, &status, &callback, &volsync,		  rx_HostOf (rx_PeerOf (conn->connection)),		  ce->cred);    child_fid->Cell = dir_entry->fid.Cell;    child_fid->fid  = OutFid;    ret = fcache_get (&child_entry, *child_fid, ce);    if (ret) {	arla_warn (ADEBFCACHE, ret, "fcache_get");	goto out;    }    update_entry (child_entry, fetch_attr, NULL, NULL,		  rx_HostOf (rx_PeerOf (conn->connection)),		  ce->cred);    child_entry->flags.attrp = TRUE;    child_entry->flags.kernelp = TRUE;    fd = fcache_open_file (child_entry, O_WRONLY | O_CREAT | O_TRUNC, 0666);    if (fd < 0) {	ret = errno;	arla_warn (ADEBFCACHE, ret, "open cache file %u",		   (unsigned)child_entry->inode);	ReleaseWriteLock (&child_entry->lock);	goto out;    }    close (fd);    child_entry->flags.datap = TRUE;    child_entry->tokens |= XFS_ATTR_R | XFS_DATA_R | XFS_DATA_W;	    ReleaseWriteLock (&child_entry->lock);out:    conn_free (conn);    return ret;}