- LASSERTF(tid->oii_ino == id->oii_ino &&
- tid->oii_gen == id->oii_gen,
- "OI mapping changed(1): %u/%u => %u/%u",
- tid->oii_ino, tid->oii_gen,
- id->oii_ino, id->oii_gen);
-
- LASSERTF(tid->oii_ino == inode->i_ino &&
- tid->oii_gen == inode->i_generation,
- "locate wrong inode(1): %u/%u => %ld/%u",
- tid->oii_ino, tid->oii_gen,
- inode->i_ino, inode->i_generation);
-
- /* "result == 0" means the cached OI mapping is still in
- * the OI file, so the target the inode is valid. */
- goto found;
+ /* The OI mapping is still there, the inode is still
+ * valid. It is just becaues the inode has no LMA EA. */
+ if (saved_ino == id->oii_ino &&
+ saved_gen == id->oii_gen)
+ goto found;
+
+ /* It is the OI scrub updated the OI mapping by race.
+ * The new OI mapping must be valid. */
+ iput(inode);
+ inode = NULL;
+ obj->oo_inode = NULL;
+ trusted = true;
+ updated = true;
+ goto iget;