[PATCH] ubifs: add update vfs super block infomation when remount to ro mode
Artem Bityutskiy
dedekind1 at gmail.com
Fri Apr 16 15:10:19 EDT 2010
On Fri, 2010-04-16 at 11:36 +0800, ZhangJieJing wrote:
> If some read/write error happens(eg.CRC error), ubifs make self a read
> only mode,
> but the vfs infomation still not update.
> This patch add this also make /proc/mounts update.
>
> Signed-off-by: Zhang Jiejing <kzjeef at gmail.com>
> ---
> fs/ubifs/io.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
> diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
> index 0168271..d33c233 100644
> --- a/fs/ubifs/io.c
> +++ b/fs/ubifs/io.c
> @@ -63,6 +63,7 @@ void ubifs_ro_mode(struct ubifs_info *c, int err)
> if (!c->ro_media) {
> c->ro_media = 1;
> c->no_chk_data_crc = 0;
> + c->vfs_sb->s_flags |= MS_RDONLY;
> ubifs_warn("switched to read-only mode, error %d", err);
> dbg_dump_stack();
> }
Looks ok for me, thanks, I'll take it to the ubifs-2.6.git tree as soon
as I return to my work office (in 2 weeks).
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
More information about the linux-mtd
mailing list