summaryrefslogtreecommitdiff
path: root/fs/nffs/src/nffs_restore.c
diff options
context:
space:
mode:
authorChristopher Collins <ccollins476ad@gmail.com>2016-02-26 12:44:24 -0800
committerChristopher Collins <ccollins476ad@gmail.com>2016-02-26 13:10:04 -0800
commit255f93749e9c06f13c58fe0d6198ca8934f2c110 (patch)
tree14f59a48ec9aa7fd5820cd64959da71d26266602 /fs/nffs/src/nffs_restore.c
parent4589d7a7c7cc31b6aa331657600d278a872933ef (diff)
(MYNEWT-167) Only ignore corruption errors when expected.
Diffstat (limited to 'fs/nffs/src/nffs_restore.c')
-rw-r--r--fs/nffs/src/nffs_restore.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/nffs/src/nffs_restore.c b/fs/nffs/src/nffs_restore.c
index 81b59a79..35e82268 100644
--- a/fs/nffs/src/nffs_restore.c
+++ b/fs/nffs/src/nffs_restore.c
@@ -283,8 +283,13 @@ nffs_restore_sweep(void)
}
}
- /* Remove the inode and all its children from RAM. */
- rc = nffs_inode_unlink_from_ram(&inode, &next);
+ /* Remove the inode and all its children from RAM. We
+ * expect some file system corruption; the children are
+ * subject to garbage collection and may not exist in the
+ * hash. Remove what is actually present and ignore
+ * corruption errors.
+ */
+ rc = nffs_inode_unlink_from_ram_corrupt_ok(&inode, &next);
if (rc != 0) {
return rc;
}