yaffs: fix missing checkpooint on yaffs remount
authorCharles Manning <cdhmanning@gmail.com>
Sun, 17 May 2015 08:02:46 +0000 (20:02 +1200)
committerCharles Manning <cdhmanning@gmail.com>
Sun, 17 May 2015 08:02:46 +0000 (20:02 +1200)
commit9ec94eea1865dfb884640c4db487d6855f801107
treed17da397821133bdb9b5c3517e84f70a288b6344
parentfcad9a38f0d67da89746cf741373052f25658254
yaffs: fix missing checkpooint on yaffs remount

For yaffs file system, the mode of reading or writing is restricted at
four pointer where are mnt->mnt_flags,mnt->mnt_sb->s_flags,mtd->flags
and dev->read_only,the first three is used handle file and file
system(eg,remount) operation, and last one(dev->read_only) almost is used
handle checkpoint of yaffs2. However, in current code, the dev->read_only
only can be changed at first time when the yaffs2 file system is mounted,
later it can't be changed again(eg,mount -o remount), the result is that
the checkpoint's saving operation always can't succeed if you set readonly
mode for yaffs2 file system when it is mounted at the first time.

To fix this issue, we implement yaffs_remount_fs() which allows the
rootfs to be remounted as r/w.

Also fix one missing argument in yaffs_flush_whole_cache() call.

Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
yaffs_vfs_multi.c
yaffs_vfs_single.c