summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-06-29 21:10:49 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-06-29 21:10:49 +0000
commitb377d12e66c679c895719a3a5dff32331a955619 (patch)
tree89c4b27e8daa7949818106be2cc1ff8cf6dbc46b
parentf1b0977a9df60d4cec6002624bd211284e10d89a (diff)
Formerly fsys-getroot.c.~9~
-rw-r--r--libdiskfs/fsys-getroot.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c
index 2a0ca806..94c504ab 100644
--- a/libdiskfs/fsys-getroot.c
+++ b/libdiskfs/fsys-getroot.c
@@ -53,6 +53,7 @@ diskfs_S_fsys_getroot (fsys_t controlport,
type = diskfs_root_node->dn_stat.st_mode & S_IFMT;
+ repeat_transcheck:
if ((diskfs_node_translated (diskfs_root_node)
|| diskfs_root_node->translator.control != MACH_PORT_NULL)
&& !(flags & O_NOTRANS))
@@ -74,6 +75,16 @@ diskfs_S_fsys_getroot (fsys_t controlport,
error = fsys_getroot (childcontrol, uids, nuids, gids, ngids,
flags, retry, retryname, returned_port);
+ if (error == MACH_SEND_INVALID_DEST)
+ {
+ /* The server has died; unrecord the translator port
+ and repeat the check. */
+ mach_port_deallocate (mach_task_self (), childcontrol);
+ mutex_lock (&diskfs_root_node->lock);
+ diskfs_root_node->translator.control = MACH_PORT_NULL;
+ goto repeat_transcheck;
+ }
+
if (!error && returned_port != MACH_PORT_NULL)
*returned_port_poly = MACH_MSG_TYPE_MOVE_SEND;
else