From: Andreas Gruenbacher Date: Fri, 5 Aug 2022 16:37:03 +0000 (+0200) Subject: Merge part of branch 'for-next.instantiate' into for-next X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=446279168e030fd0ed68e2bba336bef8bb3da352;p=linux.git Merge part of branch 'for-next.instantiate' into for-next --- 446279168e030fd0ed68e2bba336bef8bb3da352 diff --cc fs/gfs2/glock.c index e540d12900992,e79f17d6d001f..0b36a16659b62 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@@ -524,26 -533,19 +533,20 @@@ done */ static int do_promote(struct gfs2_glock *gl) - __releases(&gl->gl_lockref.lock) - __acquires(&gl->gl_lockref.lock) { - struct gfs2_holder *gh, *tmp, *first_gh; + struct gfs2_holder *gh, *current_gh; bool incompat_holders_demoted = false; - bool lock_released; - int ret; - restart: - first_gh = find_first_strong_holder(gl); - list_for_each_entry_safe(gh, tmp, &gl->gl_holders, gh_list) { - lock_released = false; + current_gh = find_first_strong_holder(gl); + list_for_each_entry(gh, &gl->gl_holders, gh_list) { if (test_bit(HIF_HOLDER, &gh->gh_iflags)) continue; - if (!may_grant(gl, first_gh, gh)) { + if (!may_grant(gl, current_gh, gh)) { /* - * If we get here, it means we may not grant this holder for - * some reason. If this holder is the head of the list, it - * means we have a blocked holder at the head, so return 1. + * If we get here, it means we may not grant this + * holder for some reason. If this holder is at the + * head of the list, it means we have a blocked holder + * at the head, so return 1. */ if (list_is_first(&gh->gh_list, &gl->gl_holders)) return 1;