Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7378caf4 authored by NeilBrown's avatar NeilBrown Committed by Greg Kroah-Hartman
Browse files

staging: lustre: ldlm: use list_first_entry in ldlm_lockd.c



This is only a small simplification, but it makes the code
a little clearer.

Signed-off-by: default avatarNeilBrown <neilb@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7b38c293
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -696,11 +696,11 @@ static int ldlm_bl_get_work(struct ldlm_bl_pool *blp,
	/* process a request from the blp_list at least every blp_num_threads */
	if (!list_empty(&blp->blp_list) &&
	    (list_empty(&blp->blp_prio_list) || num_bl == 0))
		blwi = list_entry(blp->blp_list.next,
		blwi = list_first_entry(&blp->blp_list,
					struct ldlm_bl_work_item, blwi_entry);
	else
		if (!list_empty(&blp->blp_prio_list))
			blwi = list_entry(blp->blp_prio_list.next,
			blwi = list_first_entry(&blp->blp_prio_list,
						struct ldlm_bl_work_item,
						blwi_entry);