Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2c84599c authored by Sheng Yong's avatar Sheng Yong Committed by Artem Bityutskiy
Browse files

UBIFS: do not write master node if need recovery

The commits 781c5717 ("UBIFS: intialize LPT earlier") and 09801194 ("UBIFS:
fix-up free space earlier") move some initialization before marking the
master node dirty. But the modification changes the conditions of writing
master.

If unclean umount happens, ubifs may fail when mounting. But trying to
mount it will write new master nodes on the flash. This is useless but
increasing sqnum. So check need_recovery before writing master node, and
don't create new master node if filesystem needs recovery.

The behavour of the bug shows at:
http://lists.infradead.org/pipermail/linux-mtd/2015-February/057712.html



Signed-off-by: default avatarSheng Yong <shengyong1@huawei.com>
Reviewed-by: default avatarBen Gardiner <ben.l.gardiner@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent 9401a795
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment