]> git.baikalelectronics.ru Git - kernel.git/commit
ubifs: drop false positive assertion
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 12 Sep 2018 12:51:38 +0000 (14:51 +0200)
committerRichard Weinberger <richard@nod.at>
Thu, 20 Sep 2018 19:37:07 +0000 (21:37 +0200)
commit9d6dd2c792ddc4ba622adc405c0fc7a79370b7b7
treea35b6a33a9d3abf650b87e4aa722c5727864591a
parentba5e7c54368fef84b04fa5f7357657e1de4f6ff5
ubifs: drop false positive assertion

The following sequence triggers

ubifs_assert(c, c->lst.taken_empty_lebs > 0);

at the end of ubifs_remount_fs():

mount -t ubifs /dev/ubi0_0 /mnt
echo 1 > /sys/kernel/debug/ubifs/ubi0_0/ro_error
umount /mnt
mount -t ubifs -o ro /dev/ubix_y /mnt
mount -o remount,ro /mnt

The resulting

UBIFS assert failed in ubifs_remount_fs at 1878 (pid 161)

is a false positive. In the case above c->lst.taken_empty_lebs has
never been changed from its initial zero value. This will only happen
when the deferred recovery is done.

Fix this by doing the assertion only when recovery has been done
already.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/super.c