gfs2: move GL_SKIP check from glops to do_promote
authorBob Peterson <rpeterso@redhat.com>
Mon, 13 Sep 2021 17:54:16 +0000 (12:54 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 25 Oct 2021 06:42:17 +0000 (08:42 +0200)
commitc1442f6b53d887d08a098ec23056be7cfea1e3c7
tree0c6ddb607a901f3cef47fcd2d86989999b2eef87
parent4c69038d9087109e4dcf559cd0ecb44875af3089
gfs2: move GL_SKIP check from glops to do_promote

Before this patch, each individual "go_lock" glock operation (glop)
checked the GL_SKIP flag, and if set, would skip further processing.

This patch changes the logic so the go_lock caller, function go_promote,
checks the GL_SKIP flag before calling the go_lock op in the first place.
This avoids having to unnecessarily unlock gl_lockref.lock only to
re-lock it again.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c
fs/gfs2/glops.c
fs/gfs2/rgrp.c