doc: seq_file: clarify role of *pos in ->next()
authorNeilBrown <neilb@suse.de>
Fri, 25 Sep 2020 07:14:42 +0000 (17:14 +1000)
committerJonathan Corbet <corbet@lwn.net>
Mon, 28 Sep 2020 21:19:44 +0000 (15:19 -0600)
commitce7a7eed776f994d5672ad76adb671580bd083ac
tree1649f63b8b8a85d6fd2f76e9795c92824a584eda
parente0bc9cf0a7d527ff140f851f6f1a815cc5c48fea
doc: seq_file: clarify role of *pos in ->next()

There are behavioural requirements on the seq_file next() function in
terms of how it updates *pos at end-of-file, and these are now enforced
by a warning.

I was recently attempting to justify the reason this was needed, and
couldn't remember the details, and didn't find them in the
documentation.

So I re-read the code until I understood it again, and updated the
documentation to match.

I also enhanced the text about SEQ_START_TOKEN as it seemed potentially
misleading.

Cc: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Link: https://lore.kernel.org/r/87eemqiazh.fsf@notabene.neil.brown.name
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/filesystems/seq_file.rst