projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs Handle init_timer properly for older kernels
[yaffs2.git]
/
yaffs_guts.c
diff --git
a/yaffs_guts.c
b/yaffs_guts.c
index c01f00c8b6b37239d9562a6bbf8461d486ce8308..a1782e7a5177a4293058bc7061e5c46206521887 100644
(file)
--- a/
yaffs_guts.c
+++ b/
yaffs_guts.c
@@
-2223,6
+2223,7
@@
static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
* We have to decrement free chunks so this works out properly.
*/
dev->nFreeChunks--;
* We have to decrement free chunks so this works out properly.
*/
dev->nFreeChunks--;
+ bi->softDeletions--;
object->nDataChunks--;
object->nDataChunks--;
@@
-4189,6
+4190,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
+4246,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.