+/* Invalidate the target associated with open handles that were open
+ on target TARG, since we're about to close (and maybe destroy) the
+ target. The handles remain open from the client's perspective, but
+ trying to do anything with them other than closing them will fail
+ with EIO. */
+
+static void
+fileio_handles_invalidate_target (target_ops *targ)
+{
+ for (fileio_fh_t &fh : fileio_fhandles)
+ if (fh.target == targ)
+ fh.target = NULL;
+}
+