if (copyfd2rx (fd, call, sizefs)) { ret = errno; rx_EndCall(call, ret); arla_warnx (ADEBFCACHE, "copyfd2rx"); goto out;
if (conn != NULL) { if (ret == 0) update_entry (entry, &status, &callback, &volsync, rx_HostOf(rx_PeerOf(conn->connection)), ce->cred); } else { ret = ENETDOWN;
write_data (FCacheEntry *entry, CredCacheEntry *ce){     ConnCacheEntry *conn;     struct rx_call *call;     int ret = 0;     u_int32_t sizefs;     int fd;     struct stat statinfo;     AFSStoreStatus storestatus;     AFSFetchStatus status;     AFSCallBack callback;     AFSVolSync volsync;     assert (CheckLock(&entry->lock) == -1);     conn = findconn (entry, ce);     if (conn == NULL)	 return ENETDOWN;     fd = fcache_open_file (entry, O_RDONLY, 0666);     if (fd < 0) {	 ret = errno;	 arla_warn (ADEBFCACHE, ret, "open cache file %u",		    (unsigned)entry->inode);	 goto out;     }     if (fstat (fd, &statinfo) < 0) {	  ret = errno;	  arla_warn (ADEBFCACHE, ret, "stat cache file %u",		     (unsigned)entry->inode);	  goto out;     }     sizefs = statinfo.st_size;     usedbytes = usedbytes - entry->status.Length + sizefs;     call = rx_NewCall (conn->connection);     if (call == NULL) {	 arla_warnx (ADEBMISC, "rx_NewCall failed");	 ret = ENOMEM;	 goto out;     }     storestatus.Mask = 0; /* Dont save anything */     ret = StartRXAFS_StoreData (call, &entry->fid.fid,				 &storestatus, 				 0,				 sizefs,				 sizefs);     if (ret) {	 arla_warn (ADEBFCACHE, ret, "store-data");	 rx_EndCall(call, 0);	 goto out;     }     if (copyfd2rx (fd, call, sizefs)) {	  ret = errno;	  rx_EndCall(call, ret);	  arla_warnx (ADEBFCACHE, "copyfd2rx");	  goto out;     }     ret = rx_EndCall (call, EndRXAFS_StoreData (call,						 &status,						 &callback,						 &volsync));     if (ret) {	 arla_warn (ADEBFCACHE, ret, "rx_EndCall");	 goto out;     }     update_entry (entry, &status, &callback, &volsync,		   rx_HostOf(rx_PeerOf(conn->connection)),		   ce->cred);out:     close (fd);     conn_free (conn);     return ret;}