code = afs_GetCellHostsAFSDB(acellName, cellHosts, &timeout, &realName);
if (code) goto done;
code = afs_NewCell(realName, cellHosts, CNoSUID, NULL, 0, 0, timeout);
- if (code) goto done;
+ if (code && code != EEXIST) goto done;
/* If we found an alias, create it */
if (afs_strcasecmp(acellName, realName))
* it must get servers from AFSDB.
*/
if (timeout && !tc->timeout && tc->cellHosts[0]) {
- code = EINVAL;
+ code = EEXIST; /* This code is checked for in afs_LookupAFSDB */
goto bad;
}