commit 858059f3e1009d5ba7b94bde35bdd72d31307104
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Wed Oct 28 21:20:44 2026 +0100

    Partly revert mach_port_mod_refs checks
    
    without this partial revert of 2336993cf542 ("Added checks for
    mach_port_mod_refs return value in several place"),
    
     # ls /dev/full
     # kill -9 pid_of_full
     # ls /dev/full
    
    leads to this kind of messages:
    
    task ext2fs increasing a bogus port 1993 by 1, most probably a bug.
    task ext2fs deallocating a bogus port 1993, most probably a bug.
    
    and mayhem starts.
    
    When the translator is killed, control becomes a dead port name, and
    mach_port_mod_refs fails, and the handling below probably gets wrong.

diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
index 09503340e..a7cee3352 100644
--- a/libfshelp/fetch-root.c
+++ b/libfshelp/fetch-root.c
@@ -180,16 +180,16 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
     }
 
   control = box->active;
-  err = mach_port_mod_refs (mach_task_self (), control,
+  /* FIXME: handle error properly */
+  mach_port_mod_refs (mach_task_self (), control,
 			    MACH_PORT_RIGHT_SEND, 1);
   pthread_mutex_unlock (box->lock);
 
   /* Cancellation point XXX */
-  if (!err)
-    err = fsys_getroot (control, dotdot, MACH_MSG_TYPE_COPY_SEND,
-			user->uids->ids, user->uids->num,
-			user->gids->ids, user->gids->num,
-			flags, retry, retryname, root);
+  err = fsys_getroot (control, dotdot, MACH_MSG_TYPE_COPY_SEND,
+		      user->uids->ids, user->uids->num,
+		      user->gids->ids, user->gids->num,
+		      flags, retry, retryname, root);
 
   pthread_mutex_lock (box->lock);
 
