diff options
Diffstat (limited to 'fs/ubifs/file.c')
-rw-r--r-- | fs/ubifs/file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index c6bc51c9f07c..d77db7e36484 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -433,7 +433,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping, | |||
433 | struct page *page; | 433 | struct page *page; |
434 | 434 | ||
435 | ubifs_assert(ubifs_inode(inode)->ui_size == inode->i_size); | 435 | ubifs_assert(ubifs_inode(inode)->ui_size == inode->i_size); |
436 | ubifs_assert(!c->ro_media); | 436 | ubifs_assert(!c->ro_media && !c->ro_mount); |
437 | 437 | ||
438 | if (unlikely(c->ro_error)) | 438 | if (unlikely(c->ro_error)) |
439 | return -EROFS; | 439 | return -EROFS; |
@@ -1440,8 +1440,7 @@ static int ubifs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vm | |||
1440 | 1440 | ||
1441 | dbg_gen("ino %lu, pg %lu, i_size %lld", inode->i_ino, page->index, | 1441 | dbg_gen("ino %lu, pg %lu, i_size %lld", inode->i_ino, page->index, |
1442 | i_size_read(inode)); | 1442 | i_size_read(inode)); |
1443 | ubifs_assert(!(inode->i_sb->s_flags & MS_RDONLY)); | 1443 | ubifs_assert(!c->ro_media && !c->ro_mount); |
1444 | ubifs_assert(!c->ro_media); | ||
1445 | 1444 | ||
1446 | if (unlikely(c->ro_error)) | 1445 | if (unlikely(c->ro_error)) |
1447 | return VM_FAULT_SIGBUS; /* -EROFS */ | 1446 | return VM_FAULT_SIGBUS; /* -EROFS */ |