#define xfs_symlink_hdr_ok libxfs_symlink_hdr_ok
#define xfs_verify_cksum libxfs_verify_cksum
+#define xfs_dinode_verify libxfs_dinode_verify
#define xfs_alloc_ag_max_usable libxfs_alloc_ag_max_usable
#define xfs_allocbt_maxrecs libxfs_allocbt_maxrecs
*/
if (was_free) {
/*
- * easy case, inode free -- inode and map agree, clear
+ * easy case, inode free -- inode and map agree, check
* it just in case to ensure that format, etc. are
* set correctly
*/
- if (!no_modify)
- *dirty += clear_dinode(mp, dino, lino);
+ if (libxfs_dinode_verify(mp, lino, dino) != NULL) {
+ do_warn(
+ _("free inode %" PRIu64 " contains errors, "), lino);
+ if (!no_modify) {
+ *dirty += clear_dinode(mp, dino, lino);
+ do_warn(_("corrected\n"));
+ } else {
+ do_warn(_("would correct\n"));
+ }
+ }
*used = is_free;
return 0;
}