Skip to content

Commit

Permalink
fs: dlm: fix debugfs dump
Browse files Browse the repository at this point in the history
[ Upstream commit 92c4895 ]

This patch fixes the following message which randomly pops up during
glocktop call:

seq_file: buggy .next function table_seq_next did not update position index

The issue is that seq_read_iter() in fs/seq_file.c also needs an
increment of the index in an non next record case as well which this
patch fixes otherwise seq_read_iter() will print out the above message.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Alexander Aring authored and gregkh committed May 19, 2021
1 parent ecfbec2 commit ee2202d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/dlm/debug_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ static void *table_seq_next(struct seq_file *seq, void *iter_ptr, loff_t *pos)

if (bucket >= ls->ls_rsbtbl_size) {
kfree(ri);
++*pos;
return NULL;
}
tree = toss ? &ls->ls_rsbtbl[bucket].toss : &ls->ls_rsbtbl[bucket].keep;
Expand Down

0 comments on commit ee2202d

Please sign in to comment.