[PATCH v2 28/34] ubifs: don't set SB_RDONLY after errors

Christian Brauner brauner at kernel.org
Wed Nov 11 01:37:02 PST 2026


On Fri, Oct 30, 2026 at 04:10:12PM +0000, sashiko-bot at kernel.org wrote:
> Should ubifs_ro_mode() call sb_set_emergency_ro(c->vfs_sb) unconditionally?

Yes, the background thread doesn't hold s_umount. I'll do that.

> Does allowing ubifs_remount_ro() to run after c->ro_error is set cause a NULL
> pointer dereference on c->write_reserve_buf or trigger assertions in
> reserve_space() and ubifs_wbuf_sync_nolock()?

ubifs_remount_ro() won't sync the write-buffers or write the master node
after an error anymore and ubifs_sync_fs() fails early. See my other reply.

> Now that ubifs_reconfigure() no longer returns -EROFS on a read-only remount
> when c->ro_error is set, should the assertion at the end of
> ubifs_reconfigure() also be guarded by !c->ro_error, similar to
> ubifs_put_super()?

Yes.



More information about the linux-mtd mailing list