yaffs: Skip checkpoint writing if mounted readonly
authorCharles Manning <cdhmanning@gmail.com>
Tue, 10 Aug 2010 00:43:52 +0000 (12:43 +1200)
committerCharles Manning <cdhmanning@gmail.com>
Tue, 10 Aug 2010 00:43:52 +0000 (12:43 +1200)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
yaffs_yaffs2.c

index 94ba7df..b2fd8e4 100644 (file)
@@ -206,6 +206,7 @@ int yaffs2_CheckpointRequired(yaffs_Device *dev)
        nblocks = dev->internalEndBlock - dev->internalStartBlock + 1 ;
 
        return  !dev->param.skipCheckpointWrite &&
+               !dev->readOnly &&
                (nblocks >= YAFFS_CHECKPOINT_MIN_BLOCKS);
 }