diff mbox series

[v2,1/4] lockres_seq_next should increase position index

Message ID a04e19a1-eb43-4a15-b6f8-b09a97a58ca4@virtuozzo.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/4] lockres_seq_next should increase position index | expand

Commit Message

Vasily Averin Feb. 26, 2020, 6:53 a.m. UTC
If .next function does not change position index,
following .show function will repeat output related
to current position index.

Cc: stable@vger.kernel.org
Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code ...")
Link: https://urldefense.com/v3/__https://bugzilla.kernel.org/show_bug.cgi?id=206283__;!!GqivPVa7Brio!L2HMxpDQh7db9dQNbu_Tp0uSxEzRVFvZ0bxczbKOsvt3hiKOnWevYToiSclR_wkhhve7qA$ 
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
 fs/ocfs2/dlm/dlmdebug.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
index c5c6efb..3e395cd 100644
--- a/fs/ocfs2/dlm/dlmdebug.c
+++ b/fs/ocfs2/dlm/dlmdebug.c
@@ -590,6 +590,7 @@  static void lockres_seq_stop(struct seq_file *m, void *v)
 
 static void *lockres_seq_next(struct seq_file *m, void *v, loff_t *pos)
 {
+	(*pos)++;
 	return NULL;
 }