summaryrefslogtreecommitdiff
path: root/fs/ubifs/master.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/master.c')
-rw-r--r--fs/ubifs/master.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ubifs/master.c b/fs/ubifs/master.c
index 28beaeedadc0..0c818e855f59 100644
--- a/fs/ubifs/master.c
+++ b/fs/ubifs/master.c
@@ -361,7 +361,8 @@ int ubifs_write_master(struct ubifs_info *c)
{
int err, lnum, offs, len;
- if (c->ro_media)
+ ubifs_assert(!c->ro_media);
+ if (c->ro_error)
return -EROFS;
lnum = UBIFS_MST_LNUM;