Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
seq_file: fix big-enough lseek() + read()
lseek() further than length of the file will leave stale ->index (second-to-last during iteration). Next seq_read() will not notice that ->f_pos is big enough to return 0, but will print last item as if ->f_pos is pointing to it. Introduced in commit cb510b8 aka "seq_file: more atomicity in traverse()". Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information