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 15:46:19 +0000 (17:46 +0200)
commit17c9595cca7177aa748665fbfa0e33b67ea5dc94
treef4c108b13bf675e59dfe197cfd40f97bd6f6ceeb
parent274cd3c7b5d3e11e7dd724e31e8ff7ddf82e5694
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