X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_vfs_multi.c;h=19c891907e14fd521de7a974950a2d4023e3004d;hp=a36d9bfaa9d2ba8c21bcf5af02095ab947b07002;hb=da59bf8d6a7fe444626da887e4096f411c66d4ca;hpb=eb65ac45ecf8279ba5c8657c302a3df32f0af06e diff --git a/yaffs_vfs_multi.c b/yaffs_vfs_multi.c index a36d9bf..19c8919 100644 --- a/yaffs_vfs_multi.c +++ b/yaffs_vfs_multi.c @@ -1832,10 +1832,8 @@ static int yaffs_iterate(struct file *f, struct dir_context *dc) goto out; } - if (!dir_emit_dots(f, dc)) { - yaffs_gross_unlock(dev); - return 0; - } + if (!dir_emit_dots(f, dc)) + goto out; curoffs = 1; @@ -2718,6 +2716,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; + int was_read_only = 0; struct mtd_info *mtd; struct yaffs_dev *dev = 0; @@ -2747,8 +2746,18 @@ static int yaffs_remount_fs(struct super_block *sb, int *flags, char *data) } dev = sb->s_fs_info; + was_read_only = dev->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; } @@ -3687,6 +3696,7 @@ static struct file_operations procfs_ops = { .open = yaffs_proc_open, .read = seq_read, .write = yaffs_proc_write, + .release = single_release, }; static int yaffs_procfs_init(void)