X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_guts.c;h=6524f5f5dc39211897a8c7ad3d3802f711701cc2;hp=c01f00c8b6b37239d9562a6bbf8461d486ce8308;hb=4c78eb9aa16a108e258ab6185f37a51c3b413cb8;hpb=ca0474074161712816ce1ead07dcc83c4e2ebe29 diff --git a/yaffs_guts.c b/yaffs_guts.c index c01f00c..6524f5f 100644 --- 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; + if (dev->readOnly) + return; + /* 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; + if (dev->readOnly) + return; /* Iterate through the objects in each hash entry, * looking at each object.