X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=yaffs_guts.c;h=6524f5f5dc39211897a8c7ad3d3802f711701cc2;hb=10baaa5fc285ffe29fa5c6d0ab0c58bcce78e3e0;hp=c01f00c8b6b37239d9562a6bbf8461d486ce8308;hpb=107910497be0a0d0e4a8ab357c403fc2a234323b;p=yaffs2.git 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.