diff options
Diffstat (limited to 'fs/ubifs/journal.c')
-rw-r--r-- | fs/ubifs/journal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index d321baeca68d..a6da8aa68f37 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) | |||
122 | * better to try to allocate space at the ends of eraseblocks. This is | 122 | * better to try to allocate space at the ends of eraseblocks. This is |
123 | * what the squeeze parameter does. | 123 | * what the squeeze parameter does. |
124 | */ | 124 | */ |
125 | ubifs_assert(!c->ro_media); | ||
125 | squeeze = (jhead == BASEHD); | 126 | squeeze = (jhead == BASEHD); |
126 | again: | 127 | again: |
127 | mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); | 128 | mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); |
128 | 129 | ||
129 | if (c->ro_media) { | 130 | if (c->ro_error) { |
130 | err = -EROFS; | 131 | err = -EROFS; |
131 | goto out_unlock; | 132 | goto out_unlock; |
132 | } | 133 | } |