Whamcloud - gitweb
LU-6142 lustre: use list_first/last_entry() for list heads 28/50828/5
authorMr NeilBrown <neilb@suse.de>
Wed, 6 Nov 2019 22:47:35 +0000 (09:47 +1100)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Jul 2023 16:41:50 +0000 (16:41 +0000)
commit94b72e3478d73133c29c0e31403e7e3e96a163f4
treeed453bceb8b2ecc0a8f6c421075f57b97be08709
parent08f9ebe93b300c39d2af1fb8e82a22e9c84f401b
LU-6142 lustre: use list_first/last_entry() for list heads

This patch changes
    list_entry(foo.next, ...)
to
    list_first_entry(&foo, ...)
and
    list_entry(foo.prev, ...)
to
    list_last_entry(&foo, ...)

in cases where 'foo' is a list head - not a list member.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I22b1278f5b481ce3074db3e59d37d9148016aed5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50828
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: Oleg Drokin <green@whamcloud.com>
24 files changed:
lustre/fld/fld_request.c
lustre/ldlm/ldlm_internal.h
lustre/ldlm/ldlm_lib.c
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c
lustre/lfsck/lfsck_engine.c
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_lib.c
lustre/lfsck/lfsck_namespace.c
lustre/mgs/mgs_barrier.c
lustre/mgs/mgs_nids.c
lustre/obdclass/lprocfs_status_server.c
lustre/ofd/ofd_io.c
lustre/osd-ldiskfs/osd_scrub.c
lustre/osd-zfs/osd_object.c
lustre/osd-zfs/osd_scrub.c
lustre/osp/osp_sync.c
lustre/osp/osp_trans.c
lustre/ptlrpc/nrs_tbf.c
lustre/ptlrpc/pinger.c
lustre/ptlrpc/service.c
lustre/quota/qsd_writeback.c
lustre/target/tgt_mount.c
lustre/target/update_recovery.c