projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Handle cleanup when remounting rw after mounting read-only
[yaffs2.git]
/
yaffs_vfs_multi.c
diff --git
a/yaffs_vfs_multi.c
b/yaffs_vfs_multi.c
index e4edb2cb357e328f8c906c7b01cf02ba9dd13a5a..3044db72998fa052a08b99be8eb2509c37610ba2 100644
(file)
--- a/
yaffs_vfs_multi.c
+++ b/
yaffs_vfs_multi.c
@@
-2718,6
+2718,7
@@
static int yaffs_sync_fs(struct super_block *sb)
static int yaffs_remount_fs(struct super_block *sb, int *flags, char *data)
{
int read_only = 0;
static int yaffs_remount_fs(struct super_block *sb, int *flags, char *data)
{
int read_only = 0;
+ int was_read_only = 0;
struct mtd_info *mtd;
struct yaffs_dev *dev = 0;
struct mtd_info *mtd;
struct yaffs_dev *dev = 0;
@@
-2747,8
+2748,18
@@
static int yaffs_remount_fs(struct super_block *sb, int *flags, char *data)
}
dev = sb->s_fs_info;
}
dev = sb->s_fs_info;
+ was_read_only = dev->read_only;
dev->read_only = read_only;
dev->read_only = read_only;
+ if (was_read_only && !read_only) {
+ yaffs_gross_lock(dev);
+ yaffs_guts_cleanup(dev);
+ yaffs_gross_unlock(dev);
+ yaffs_bg_start(dev);
+ } else if (!was_read_only && read_only) {
+ yaffs_bg_stop(dev);
+ }
+
return 0;
}
return 0;
}