From b1a84b4b55ea22b4392a518f882ef1ba28b0b3af Mon Sep 17 00:00:00 2001 From: Xiaoguang Wang Date: Thu, 29 Apr 2021 14:15:52 +0800 Subject: [PATCH 2703/2944] alinux: jbd2: jbd2_seq_stats_next should increase position index fix #34284629 If seq_file .next function does not change position index, read after some lseek can generate unexpected output. See: https://bugzilla.kernel.org/show_bug.cgi?id=206283 Reviewed-by: Joseph Qi Signed-off-by: Xiaoguang Wang --- fs/jbd2/journal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 9528e49..9f03a89 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1116,6 +1116,7 @@ static void *jbd2_seq_stats_start(struct seq_file *seq, loff_t *pos) static void *jbd2_seq_stats_next(struct seq_file *seq, void *v, loff_t *pos) { + (*pos)++; return NULL; } -- 1.8.3.1