@@ -468,10 +468,10 @@ int gfs2_instantiate(struct gfs2_holder *gh)
468468 * do_promote - promote as many requests as possible on the current queue
469469 * @gl: The glock
470470 *
471- * Returns: 1 if there is a blocked holder at the head of the list
471+ * Returns true on success (i.e., progress was made or there are no waiters).
472472 */
473473
474- static int do_promote (struct gfs2_glock * gl )
474+ static bool do_promote (struct gfs2_glock * gl )
475475{
476476 struct gfs2_holder * gh , * current_gh ;
477477
@@ -484,10 +484,10 @@ static int do_promote(struct gfs2_glock *gl)
484484 * If we get here, it means we may not grant this
485485 * holder for some reason. If this holder is at the
486486 * head of the list, it means we have a blocked holder
487- * at the head, so return 1 .
487+ * at the head, so return false .
488488 */
489489 if (list_is_first (& gh -> gh_list , & gl -> gl_holders ))
490- return 1 ;
490+ return false ;
491491 do_error (gl , 0 );
492492 break ;
493493 }
@@ -497,7 +497,7 @@ static int do_promote(struct gfs2_glock *gl)
497497 if (!current_gh )
498498 current_gh = gh ;
499499 }
500- return 0 ;
500+ return true ;
501501}
502502
503503/**
@@ -834,7 +834,7 @@ __acquires(&gl->gl_lockref.lock)
834834 } else {
835835 if (test_bit (GLF_DEMOTE , & gl -> gl_flags ))
836836 gfs2_demote_wake (gl );
837- if (do_promote (gl ) == 0 )
837+ if (do_promote (gl ))
838838 goto out_unlock ;
839839 gh = find_first_waiter (gl );
840840 gl -> gl_target = gh -> gh_state ;
0 commit comments