[v2,02/29] lustre: llite: fix error in vvp_pgcache seqfile.
diff mbox series

Message ID 1558356671-29599-3-git-send-email-jsimmons@infradead.org
State New
Headers show
Series
  • More lustre patches
Related show

Commit Message

James Simmons May 20, 2019, 12:50 p.m. UTC
From: NeilBrown <neilb@suse.com>

The ->next function should increment the 'pos', but it doesn't.
This oversight causes the WARN_ON to fire.
Core seq_file code tries to handle this error, but it is
best not to make it.

Signed-off-by: NeilBrown <neilb@suse.com>
---
 fs/lustre/llite/vvp_dev.c | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox series

diff --git a/fs/lustre/llite/vvp_dev.c b/fs/lustre/llite/vvp_dev.c
index c10ca6e..96262a1 100644
--- a/fs/lustre/llite/vvp_dev.c
+++ b/fs/lustre/llite/vvp_dev.c
@@ -565,6 +565,7 @@  static void *vvp_pgcache_next(struct seq_file *f, void *v, loff_t *pos)
 
 	WARN_ON(*pos != priv->vsp_prev_pos);
 
+	(*pos)++;
 	priv->vsp_prev_pos = *pos;
 	return vvp_pgcache_next_page(priv);
 }