Whamcloud - gitweb
LU-6142 ldlm: tidy list walking in ldlm_flock() 58/49358/2
authorMr. NeilBrown <neilb@suse.de>
Sat, 10 Dec 2022 14:17:46 +0000 (09:17 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 19 Jan 2023 15:27:45 +0000 (15:27 +0000)
commitc0aa5d97da570ea5abca5fb7323c70a3f8fd3b24
treec180d34ec41ad40ed86c8f5a0bfbeb348d6bd3aa
parent540c293a4d0fc80253670b3db8d6722da43284ad
LU-6142 ldlm: tidy list walking in ldlm_flock()

Use list_for_each_entry variants to
avoid the explicit list_entry() calls.
This allows us to use list_for_each_entry_safe_from()
instread of adding a local list-walking macro.

Also improve some comments so that it is more obvious
that the locks are sorted per-owner and that we need
to find the insertion point.

Linux-commit: 3ac5a67 ("staging: lustre: ldlm: tidy list walking in ldlm_flock()")

Change-Id: Ie9a756a898a9c58db1b4f446694603a4efa37352
Signed-off-by: Mr. NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49358
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_flock.c