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

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
...@@ -696,11 +696,11 @@ static int ldlm_bl_get_work(struct ldlm_bl_pool *blp, ...@@ -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 */ /* process a request from the blp_list at least every blp_num_threads */
if (!list_empty(&blp->blp_list) && if (!list_empty(&blp->blp_list) &&
(list_empty(&blp->blp_prio_list) || num_bl == 0)) (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); struct ldlm_bl_work_item, blwi_entry);
else else
if (!list_empty(&blp->blp_prio_list)) 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, struct ldlm_bl_work_item,
blwi_entry); blwi_entry);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment