]> asedeno.scripts.mit.edu Git - linux.git/commit
staging: lustre: ldlm: tidy list walking in ldlm_flock()
authorNeilBrown <neilb@suse.com>
Mon, 23 Oct 2017 00:53:49 +0000 (11:53 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Nov 2017 14:00:34 +0000 (15:00 +0100)
commit3ac5a675caf4dde2788a7a1ac32b95986bffe901
tree24af0d4ea5f7ef0a1592e2ccaebdedbcdefa3ffa
parent60751d49e0a7fe93b8467bd8c50101cc9367c605
staging: lustre: 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.

Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c