- /* Tried to delete local agent inode for the entries,
- * If it tries to delete .., which only happens during
- * rename or move the dir to /ORPHAN, even .. might
- * point to the remote parent, but it do not have
- * local agent inode, so we do not need check .. at all,
- * Note: we need delete entry first, then inode to keep
- * lfsck safe. */
+ /* If this is not the ".." entry, it might be a remote DNE
+ * entry and we need to check if the FID is for a remote
+ * MDT. If the FID is not in the directory entry (e.g.
+ * upgraded 1.8 filesystem without dirdata enabled) then
+ * we need to get the FID from the LMA. For a remote directory
+ * there HAS to be an LMA, it cannot be an IGIF inode in this
+ * case.
+ *
+ * Delete the entry before the agent inode in order to
+ * simplify error handling. At worst an error after deleting
+ * the entry first might leak the agent inode afterward. The
+ * reverse would need filesystem abort in case of error deleting
+ * the entry after the agent had been removed, or leave a
+ * dangling entry pointing at a random inode. */