From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Tue, 24 Aug 2021 11:48:00 -0500 Subject: [Cluster-devel] [GFS2 PATCH 1/3] gfs2: switch go_xmote_bh glop to pass gh not gl In-Reply-To: References: <20210824140241.149386-1-rpeterso@redhat.com> <20210824140241.149386-2-rpeterso@redhat.com> Message-ID: <26cea225-e7c4-bf96-57a2-5416ffb7d8c2@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, On 8/24/21 11:12 AM, Andreas Gruenbacher wrote: > On Tue, Aug 24, 2021 at 4:02 PM Bob Peterson wrote: >> Before this patch, the go_xmote_bh function was passed gl, the glock >> pointer. This patch switches it to gh, the holder, which points to the gl. >> This facilitates improvements for the next patch. >> >> Signed-off-by: Bob Peterson >> --- >> fs/gfs2/glock.c | 4 ++-- >> fs/gfs2/glops.c | 5 +++-- >> fs/gfs2/incore.h | 2 +- >> 3 files changed, 6 insertions(+), 5 deletions(-) >> >> diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c >> index e0eaa9cf9fb6..d43eed1696ab 100644 >> --- a/fs/gfs2/glock.c >> +++ b/fs/gfs2/glock.c >> @@ -562,9 +562,9 @@ static void finish_xmote(struct gfs2_glock *gl, unsigned int ret) >> if (test_and_clear_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags)) >> gfs2_demote_wake(gl); >> if (state != LM_ST_UNLOCKED) { >> - if (glops->go_xmote_bh) { >> + if (gh && glops->go_xmote_bh) { > > This changes when the callback is called. Please explain why that's okay. This is okay because patch 3 eliminates go_xmote_bh() completely anyway. I just threw the "gh &&" as an abundance of precaution. Regards, Bob