ubi: Fix seq_file usage in detailed_erase_block_info debugfs file
authorRichard Weinberger <richard@nod.at>
Sat, 2 May 2020 12:48:02 +0000 (14:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 May 2020 14:42:53 +0000 (16:42 +0200)
commitd840a584a8fbccefbdbdac6a46e4788390c8d653
tree4c5340725180056aba2a44cd7402318181f4ace1
parentaf50d1a9c1affab776d5a8c8558a3adafdce1eeb
ubi: Fix seq_file usage in detailed_erase_block_info debugfs file

[ Upstream commit 0e7572cffe442290c347e779bf8bd4306bb0aa7c ]

3bfa7e141b0b ("fs/seq_file.c: seq_read(): add info message about buggy .next functions")
showed that we don't use seq_file correctly.
So make sure that our ->next function always updates the position.

Fixes: 7bccd12d27b7 ("ubi: Add debugfs file for tracking PEB state")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/ubi/debug.c