jffs2: check if partition is marked RO on remount
PATCH 1/1 jffs2: check if partition is marked RO on remount
and if it is, don't tell userspace that write is possible.
Signed-off-by Sebastian Siewior <[email protected]>
--- fs/jffs2/fs.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
fs/jffs2/fs.c +3 -0
@@ -374,6 +374,9 @@ int jffs2_remount_fs (struct super_block *sb, int *flags, char *data)if (c->flags &JFFS2_SB_FLAG_RO && !(sb->s_flags &MS_RDONLY ))return -EROFS ; +if (!(c->mtd->flags &MTD_WRITEABLE )) +return -EROFS ; +/* We stop if it was running, then restart if it needs to. This also catches the case where it was stopped and this is just a remount to restart it.
Signature · 1 line
1.5.3.5