ocfs2-devel.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Vasily Averin <vvs@virtuozzo.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH v2 2/4] ocfs2_dlm_seq_next should increase position index
Date: Wed, 26 Feb 2020 09:53:36 +0300	[thread overview]
Message-ID: <aa7c77d4-8e90-2ddc-212b-8f75ebe778f4@virtuozzo.com> (raw)
In-Reply-To: <109025ac-74e9-6afe-3790-c7adbdaa3053@linux.alibaba.com>

If .next function does not change position index,
following .show function will repeat output related
to current position index.

Cc: stable at 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!MSixDxrphasW57tPl4VD6FKe6ZxcdQkP0oN-cWbZFdRxlNR1AOaFgm3-OunznZSXFEf0Nw$ 
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
 fs/ocfs2/dlmglue.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index cb9e6a7..170eb75 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -3080,6 +3080,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);
-- 
1.8.3.1

  parent reply	other threads:[~2020-02-26  6:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ca1497b7-6a6e-8043-63c7-b17c094ebc05@virtuozzo.com>
2020-01-26  2:21 ` [Ocfs2-devel] [PATCH 1/4] lockres_seq_next should increase position index Joseph Qi
2020-02-26  6:52   ` [Ocfs2-devel] [PATCH v2 0/4] ocfs2: seq_file .next functions " Vasily Averin
2020-02-26  8:32     ` Joseph Qi
2020-03-09 11:32       ` piaojun
     [not found]       ` <e954f783-5a1c-8847-7b0d-298825ee06a4@huawei.com>
2020-03-21  4:24         ` [Ocfs2-devel] Fwd: " lishan
2020-03-22  7:27           ` Vasily Averin
2020-04-14  6:16             ` [Ocfs2-devel] [PATCH v3 0/4] ocfs2: seq_operation should properly handle " Vasily Averin
2020-04-14  6:17             ` [Ocfs2-devel] [PATCH v3 1/4] ocfs2: debug_lockres_ops " Vasily Averin
2020-04-14  6:17             ` [Ocfs2-devel] [PATCH v3 2/4] ocfs2: ocfs2_dlm_seq_ops " Vasily Averin
2020-04-14  6:17             ` [Ocfs2-devel] [PATCH v3 3/4] ocfs2: nst_seq_ops " Vasily Averin
2020-04-14  6:17             ` [Ocfs2-devel] [PATCH v3 4/4] ocfs2: sc_seq_ops " Vasily Averin
2020-02-26  6:53   ` [Ocfs2-devel] [PATCH v2 1/4] lockres_seq_next should increase " Vasily Averin
2020-02-26  6:53   ` Vasily Averin [this message]
2020-02-26  6:53   ` [Ocfs2-devel] [PATCH v2 3/4] nst_seq_next " Vasily Averin
2020-02-26  6:54   ` [Ocfs2-devel] [PATCH v2 4/4] sc_seq_next " Vasily Averin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aa7c77d4-8e90-2ddc-212b-8f75ebe778f4@virtuozzo.com \
    --to=vvs@virtuozzo.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).