- if (is_bad_inode(inode)) {
- rc = -ENOENT;
- if (!trusted)
- goto check_oi;
-
- CDEBUG(D_INODE, "bad inode for FID: "DFID", ino = %u\n",
- PFID(fid), id->oii_ino);
- GOTO(put, rc);
- }
-
- if (id->oii_gen != OSD_OII_NOGEN &&
- inode->i_generation != id->oii_gen) {
- rc = -ESTALE;
- if (!trusted)
- goto check_oi;
-
- CDEBUG(D_INODE, "unmatched inode for FID: "DFID", ino = %u, "
- "oii_gen = %u, i_generation = %u\n", PFID(fid),
- id->oii_ino, id->oii_gen, inode->i_generation);
- GOTO(put, rc);
- }
-
- if (inode->i_nlink == 0) {
- rc = -ENOENT;
- if (!trusted)
- goto check_oi;
-
- CDEBUG(D_INODE, "stale inode for FID: "DFID", ino = %u\n",
- PFID(fid), id->oii_ino);
- GOTO(put, rc);
- }
-
- ldiskfs_clear_inode_state(inode, LDISKFS_STATE_LUSTRE_DESTROY);
-