Whamcloud - gitweb
LU-13985 lustre: seq_file .next functions must update *pos 35/40035/3
authorMr NeilBrown <neilb@suse.de>
Thu, 24 Sep 2020 23:46:24 +0000 (09:46 +1000)
committerOleg Drokin <green@whamcloud.com>
Mon, 12 Oct 2020 05:47:33 +0000 (05:47 +0000)
commit817d6c116599639599919bcde7999a7f06b74d2c
treefeec9da89647f27de0b82cdb859ede4d2fcb56d5
parentc03c500529b0b6e0310c95132d5e8b40912ede8e
LU-13985 lustre: seq_file .next functions must update *pos

A seq_file .next function must update *pos on EOF to a value which
will cause a subsequent ->start to also return EOF.
If it doesn't the last record of the file can be returned
twice to a 'read()'.  Also the seq_file code will generate
a warning.

This patch fixes various ->next functions to always update
*pos.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ia0c432cd50550ecde6b308cbc554b316fa03adae
Reviewed-on: https://review.whamcloud.com/40035
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ldiskfs/kernel_patches/patches/rhel7.6/ext4-track-extent-status-tree-shrinker-delay-statict.patch
lnet/klnds/gnilnd/gnilnd_proc.c
lustre/fid/lproc_fid.c
lustre/fld/lproc_fld.c
lustre/lov/lov_pool.c
lustre/obdclass/lu_ref.c
lustre/ptlrpc/lproc_ptlrpc.c