]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/ubifs/journal.c
UBIFS: introduce new flag for RO due to errors
[mirror_ubuntu-zesty-kernel.git] / fs / ubifs / journal.c
index d321baeca68db65cb0bcce2fcd38ead5ee4e2e65..a6da8aa68f378834f2caba7003cec9612d6795c8 100644 (file)
@@ -122,11 +122,12 @@ static int reserve_space(struct ubifs_info *c, int jhead, int len)
         * better to try to allocate space at the ends of eraseblocks. This is
         * what the squeeze parameter does.
         */
+       ubifs_assert(!c->ro_media);
        squeeze = (jhead == BASEHD);
 again:
        mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead);
 
-       if (c->ro_media) {
+       if (c->ro_error) {
                err = -EROFS;
                goto out_unlock;
        }