diff options
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 336073e4c391..fd7fc7f3b7a6 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -1524,6 +1524,12 @@ static int ubifs_remount_rw(struct ubifs_info *c) | |||
1524 | err = ubifs_recover_inl_heads(c, c->sbuf); | 1524 | err = ubifs_recover_inl_heads(c, c->sbuf); |
1525 | if (err) | 1525 | if (err) |
1526 | goto out; | 1526 | goto out; |
1527 | } else { | ||
1528 | /* A readonly mount is not allowed to have orphans */ | ||
1529 | ubifs_assert(c->tot_orphans == 0); | ||
1530 | err = ubifs_clear_orphans(c); | ||
1531 | if (err) | ||
1532 | goto out; | ||
1527 | } | 1533 | } |
1528 | 1534 | ||
1529 | if (!(c->mst_node->flags & cpu_to_le32(UBIFS_MST_DIRTY))) { | 1535 | if (!(c->mst_node->flags & cpu_to_le32(UBIFS_MST_DIRTY))) { |