Re: [PATCH] ocfs2: update seq_file index in ocfs2_dlm_seq_next
From: Joseph Qi
Date: Sun Nov 10 2024 - 20:38:41 EST
On 11/9/24 3:28 AM, Wengang Wang wrote:
> The following INFO level message was seen:
>
> seq_file: buggy .next function ocfs2_dlm_seq_next [ocfs2] did not
> update position index
>
> Fix:
> Updata m->index to make seq_read_iter happy though the index its self makes
> no sense to ocfs2_dlm_seq_next.
>
> Signed-off-by: Wengang Wang <wen.gang.wang@xxxxxxxxxx>
> ---
> fs/ocfs2/dlmglue.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
> index 60df52e4c1f8..349d131369cf 100644
> --- a/fs/ocfs2/dlmglue.c
> +++ b/fs/ocfs2/dlmglue.c
> @@ -3120,6 +3120,7 @@ static void *ocfs2_dlm_seq_next(struct seq_file *m, void *v, loff_t *pos)
> }
> spin_unlock(&ocfs2_dlm_tracking_lock);
>
> + m->index++;
We can directly use '(*pos)++' instead.
Thanks,
Joseph
> return iter;
> }
>