Whamcloud - gitweb
LU-9679 ptlrpc: list_for_each improvements. 33/39133/4
authorMr NeilBrown <neilb@suse.de>
Sun, 7 Jun 2020 23:24:24 +0000 (19:24 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 21:07:35 +0000 (21:07 +0000)
commitdcc8b9c00d5de4bf4580e74bea47e3f99b2ad5da
tree85606d8ad4c0af7de1c206ce4dec75bedacd97b0
parent977217520e9488df53ddcf9b4d97641cda24ae78
LU-9679 ptlrpc: list_for_each improvements.

1/ use list_for_each_entry_safe() instead of
   list_for_each_safe() and similar.

2/ use list_first_entry() and list_last_entry() where appropriate.

3/ When removing everything from a list, use
   while ((x = list_first_entry_or_null()) {
   as it makes the intent clear

Linux-commit: ef8e5dbbb09035a0c41aa47a328e6248702d4d2b

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I490afcb70d18170e4ecc5d062d327d141668d3db
Reviewed-on: https://review.whamcloud.com/39133
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/client.c
lustre/ptlrpc/import.c
lustre/ptlrpc/pinger.c
lustre/ptlrpc/ptlrpcd.c
lustre/ptlrpc/recover.c
lustre/ptlrpc/service.c