]> Git Repo - linux.git/commitdiff
ocfs2: update seq_file index in ocfs2_dlm_seq_next
authorWengang Wang <[email protected]>
Tue, 19 Nov 2024 17:45:00 +0000 (09:45 -0800)
committerAndrew Morton <[email protected]>
Fri, 6 Dec 2024 03:54:45 +0000 (19:54 -0800)
The following INFO level message was seen:

seq_file: buggy .next function ocfs2_dlm_seq_next [ocfs2] did not
update position index

Fix:
Update *pos (so m->index) to make seq_read_iter happy though the index its
self makes no sense to ocfs2_dlm_seq_next.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Wengang Wang <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Changwei Ge <[email protected]>
Cc: Jun Piao <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
fs/ocfs2/dlmglue.c

index 60df52e4c1f878f013db628588253e02af929d3e..764ecbd5ad41ddf0d455fee9e6b365ef1a03f100 100644 (file)
@@ -3110,6 +3110,7 @@ static void *ocfs2_dlm_seq_next(struct seq_file *m, void *v, loff_t *pos)
        struct ocfs2_lock_res *iter = v;
        struct ocfs2_lock_res *dummy = &priv->p_iter_res;
 
+       (*pos)++;
        spin_lock(&ocfs2_dlm_tracking_lock);
        iter = ocfs2_dlm_next_res(iter, priv);
        list_del_init(&dummy->l_debug_list);
This page took 0.055914 seconds and 4 git commands to generate.