res = cm_link (*parent_fid, h->name, *existing_fid, &fetch_status, ce);
do { res = cm_link (*parent_fid, h->name, *existing_fid, &fetch_status, ce); if (res.res) ret = res.error; else ret = res.res; } while (try_again (&ret, &ce, &h->cred, parent_fid));
xfs_message_link (int fd, struct xfs_message_link *h, u_int size){     VenusFid *parent_fid, *existing_fid;     AFSFetchStatus fetch_status;     Result res;     CredCacheEntry *ce;     int ret;     struct xfs_message_installdata msg1;     struct xfs_message_installnode msg2;     struct xfs_message_header *h0 = NULL;     size_t h0_len = 0;     struct xfs_message_header *h1 = NULL;     size_t h1_len = 0;     parent_fid   = (VenusFid *)&h->parent_handle;     existing_fid = (VenusFid *)&h->from_handle;     ce = cred_get (parent_fid->Cell, h->cred.pag, CRED_ANY);     assert (ce != NULL);     res = cm_link (*parent_fid, h->name, *existing_fid,		    &fetch_status, ce);     if (res.res == 0) {	 FCacheEntry *dir_entry;	 char tmp[5];	 VenusFid realfid;	 ret = fcache_get (&dir_entry, *parent_fid, ce);	 if (ret)	     goto out;	 ret = fcache_get_data (dir_entry, ce);	 if (ret) {	     ReleaseWriteLock (&dir_entry->lock);	     goto out;	 }	     	 res = conv_dir (dir_entry, tmp, sizeof(tmp), ce, 0); /* XXX */	 if (res.res == -1) {	     ReleaseWriteLock (&dir_entry->lock);	     ret = res.error;	     goto out;	 }	 strncpy((char *)&msg1.cache_handle, tmp, 4);	 msg1.node.tokens = res.tokens;	 if (dir_entry->flags.mountp)	     realfid = dir_entry->realfid;	 else	     realfid = *parent_fid;	 fcacheentry2xfsnode (parent_fid, &realfid,			      &dir_entry->status, &msg1.node,			      dir_entry->acccache);	 	 msg1.header.opcode = XFS_MSG_INSTALLDATA;	 h0 = (struct xfs_message_header *)&msg1;	 h0_len = sizeof(msg1);	 ReleaseWriteLock (&dir_entry->lock);	 fcacheentry2xfsnode (existing_fid, existing_fid,			      &fetch_status, &msg2.node,			      dir_entry->acccache);			      	 msg2.node.tokens   = XFS_ATTR_R; /* XXX */	 msg2.parent_handle = h->parent_handle;	 strcpy (msg2.name, h->name);	 msg2.header.opcode = XFS_MSG_INSTALLNODE;	 h1 = (struct xfs_message_header *)&msg2;	 h1_len = sizeof(msg2);     }     if (res.res == -1) {	 ret = res.error;	 if (ret == RXKADEXPIRED) {	     cred_expire (ce);	     cred_free (ce);	     return xfs_message_link (fd, h, size);	 }     } else	 ret = 0;out:     cred_free (ce);     xfs_send_message_wakeup_multiple (fd,				       h->header.sequence_num,				       ret,				       h0, h0_len,				       h1, h1_len,				       NULL, 0);     return ret;}