projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs: Batter read-only support handling
[yaffs2.git]
/
yaffs_guts.c
diff --git
a/yaffs_guts.c
b/yaffs_guts.c
index c01f00c8b6b37239d9562a6bbf8461d486ce8308..6524f5f5dc39211897a8c7ad3d3802f711701cc2 100644
(file)
--- a/
yaffs_guts.c
+++ b/
yaffs_guts.c
@@
-4189,6
+4189,9
@@
static void yaffs_StripDeletedObjects(yaffs_Device *dev)
struct ylist_head *n;
yaffs_Object *l;
struct ylist_head *n;
yaffs_Object *l;
+ if (dev->readOnly)
+ return;
+
/* Soft delete all the unlinked files */
ylist_for_each_safe(i, n,
&dev->unlinkedDir->variant.directoryVariant.children) {
/* Soft delete all the unlinked files */
ylist_for_each_safe(i, n,
&dev->unlinkedDir->variant.directoryVariant.children) {
@@
-4242,6
+4245,8
@@
static void yaffs_FixHangingObjects(yaffs_Device *dev)
int depthLimit;
int hanging;
int depthLimit;
int hanging;
+ if (dev->readOnly)
+ return;
/* Iterate through the objects in each hash entry,
* looking at each object.
/* Iterate through the objects in each hash entry,
* looking at each object.