Whamcloud - gitweb
LU-6142 all: use list_first_entry() where appropriate. 26/50826/2
authorMr NeilBrown <neilb@suse.de>
Wed, 6 Nov 2019 21:58:04 +0000 (08:58 +1100)
committerOleg Drokin <green@whamcloud.com>
Wed, 31 May 2023 19:03:31 +0000 (19:03 +0000)
commit01e054b34cb894bd4ad1b9d68819db3e6fce4ed4
tree1840e3f92da78f1c58883fb38d05588732f9fee6
parent80a4a2ebe0a269d564e13b0931c9852379da86d8
LU-6142 all: use list_first_entry() where appropriate.

Lustre already uses list_first_entry() in many places, but
it is not consistent.  Let's make it consistent.
The patch was generated with

 sed -i 's/list_entry(([^,]*)->next,/list_first_entry(1,/'
     `git grep -l 'list_entry(.*->next' lustre/ lnet/ libcfs/ `

followed by some manual cleanup of indents, and adding
list_first_entry() to libcfs/include/libcfs/util/list.h

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Id646fba1faf40282e66ede07c88c8db5ffadc211
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50826
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 files changed:
libcfs/include/libcfs/util/list.h
libcfs/libcfs/libcfs_string.c
libcfs/libcfs/util/nidstrings.c
libcfs/libcfs/util/string.c
lnet/lnet/lib-move.c
lnet/selftest/rpc.c
lnet/selftest/timer.c
lnet/utils/lnetconfig/cyaml.c
lnet/utils/lst.c
lustre/fld/fld_request.c
lustre/ldlm/ldlm_inodebits.c
lustre/ldlm/ldlm_lockd.c
lustre/lfsck/lfsck_engine.c
lustre/obdclass/scrub.c
lustre/osd-zfs/osd_handler.c