X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fubifs%2Fjournal.c;h=914f1bd89e571f2df8ce99d053f718ad3cc29dbd;hb=7d2f280e75f05919314e250cadf361a327ed555c;hp=d321baeca68db65cb0bcce2fcd38ead5ee4e2e65;hpb=342688f9db392ec82ab9e6b25a6137f9ee1647d7;p=~andy%2Flinux diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index d321baeca68..914f1bd89e5 100644 --- a/fs/ubifs/journal.c +++ b/fs/ubifs/journal.c @@ -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 && !c->ro_mount); 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; }