From: Andreas Gruenbacher <agruenba@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 5/9] gfs2: Make go_instantiate take a glock
Date: Wed, 29 Jun 2022 18:37:07 +0200 [thread overview]
Message-ID: <20220629163711.732931-6-agruenba@redhat.com> (raw)
In-Reply-To: <20220629163711.732931-1-agruenba@redhat.com>
Make go_instantiate take a glock instead of a glock holder as its argument:
this handler is supposed to instantiate the object associated with the glock.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
fs/gfs2/glock.c | 2 +-
fs/gfs2/glops.c | 3 +--
fs/gfs2/incore.h | 2 +-
fs/gfs2/rgrp.c | 3 +--
fs/gfs2/rgrp.h | 2 +-
5 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 6fe088644d7d..832af9a03b15 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -507,7 +507,7 @@ int gfs2_instantiate(struct gfs2_holder *gh)
goto again;
}
- ret = glops->go_instantiate(gh);
+ ret = glops->go_instantiate(gl);
if (!ret)
clear_bit(GLF_INSTANTIATE_NEEDED, &gl->gl_flags);
clear_and_wake_up_bit(GLF_INSTANTIATE_IN_PROG, &gl->gl_flags);
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index 4e0a9909087c..49210a2e7ce7 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -485,9 +485,8 @@ int gfs2_inode_refresh(struct gfs2_inode *ip)
* Returns: errno
*/
-static int inode_go_instantiate(struct gfs2_holder *gh)
+static int inode_go_instantiate(struct gfs2_glock *gl)
{
- struct gfs2_glock *gl = gh->gh_gl;
struct gfs2_inode *ip = gl->gl_object;
if (!ip) /* no inode to populate - read it in later */
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 15e4258a1dad..d09d9892cd05 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -219,7 +219,7 @@ struct gfs2_glock_operations {
int (*go_xmote_bh)(struct gfs2_glock *gl);
void (*go_inval) (struct gfs2_glock *gl, int flags);
int (*go_demote_ok) (const struct gfs2_glock *gl);
- int (*go_instantiate) (struct gfs2_holder *gh);
+ int (*go_instantiate) (struct gfs2_glock *gl);
int (*go_held)(struct gfs2_holder *gh);
void (*go_dump)(struct seq_file *seq, struct gfs2_glock *gl,
const char *fs_id_buf);
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 8a63870eef5a..5439bad3083e 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1196,9 +1196,8 @@ static void rgrp_set_bitmap_flags(struct gfs2_rgrpd *rgd)
* Returns: errno
*/
-int gfs2_rgrp_go_instantiate(struct gfs2_holder *gh)
+int gfs2_rgrp_go_instantiate(struct gfs2_glock *gl)
{
- struct gfs2_glock *gl = gh->gh_gl;
struct gfs2_rgrpd *rgd = gl->gl_object;
struct gfs2_sbd *sdp = rgd->rd_sbd;
unsigned int length = rgd->rd_length;
diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h
index 46dd94e9e085..c75bac45d314 100644
--- a/fs/gfs2/rgrp.h
+++ b/fs/gfs2/rgrp.h
@@ -31,7 +31,7 @@ extern struct gfs2_rgrpd *gfs2_rgrpd_get_next(struct gfs2_rgrpd *rgd);
extern void gfs2_clear_rgrpd(struct gfs2_sbd *sdp);
extern int gfs2_rindex_update(struct gfs2_sbd *sdp);
extern void gfs2_free_clones(struct gfs2_rgrpd *rgd);
-extern int gfs2_rgrp_go_instantiate(struct gfs2_holder *gh);
+extern int gfs2_rgrp_go_instantiate(struct gfs2_glock *gl);
extern void gfs2_rgrp_brelse(struct gfs2_rgrpd *rgd);
extern struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip);
--
2.35.1
next prev parent reply other threads:[~2022-06-29 16:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 16:37 [Cluster-devel] [PATCH 0/9] gfs2: glock instantiation and holder auto-demotion fixes Andreas Gruenbacher
2022-06-29 16:37 ` [Cluster-devel] [PATCH 1/9] gfs2: Fix up gfs2_glock_async_wait Andreas Gruenbacher
2022-06-29 16:37 ` [Cluster-devel] [PATCH 2/9] gfs2: Instantiate glocks ouside of glock state engine Andreas Gruenbacher
2022-06-29 16:37 ` [Cluster-devel] [PATCH 3/9] gfs2: Revert 'Fix "truncate in progress" hang' Andreas Gruenbacher
2022-06-29 16:37 ` [Cluster-devel] [PATCH 4/9] gfs2: Add new go_held glock operation Andreas Gruenbacher
2022-06-29 16:37 ` Andreas Gruenbacher [this message]
2022-06-29 16:37 ` [Cluster-devel] [PATCH 6/9] gfs2: Use better variable name Andreas Gruenbacher
2022-06-29 16:37 ` [Cluster-devel] [PATCH 7/9] gfs2: do_promote glock holder stealing fix Andreas Gruenbacher
2022-06-29 16:37 ` [Cluster-devel] [PATCH 8/9] gfs2: List traversal in do_promote is safe Andreas Gruenbacher
2022-06-29 16:37 ` [Cluster-devel] [PATCH 9/9] Revert "gfs2: Stop using glock holder auto-demotion for now" Andreas Gruenbacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220629163711.732931-6-agruenba@redhat.com \
--to=agruenba@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).