gfs2: Make go_instantiate take a glock
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 10 Jun 2022 10:06:06 +0000 (12:06 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 29 Jun 2022 14:59:07 +0000 (16:59 +0200)
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
fs/gfs2/glops.c
fs/gfs2/incore.h
fs/gfs2/rgrp.c
fs/gfs2/rgrp.h

index 6fe088644d7d95888467d7056557be6b98dcefb9..832af9a03b151b458a012486cd7748719a9142ae 100644 (file)
@@ -507,7 +507,7 @@ again:
                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);
index 4e0a9909087c61c1dc85f0538e6b8574643a7ace..49210a2e7ce753784483b43ad59a2d2f81fc8506 100644 (file)
@@ -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 */
index 15e4258a1dad4faf0add3ea2899eb64ca0304199..d09d9892cd055baff3e226612a26d9d8816c18dd 100644 (file)
@@ -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);
index 8a63870eef5ad7d0b635eadda84594c472245d6c..5439bad3083ef2ad6551360d39b4b948b50adfb2 100644 (file)
@@ -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;
index 46dd94e9e085c20748e744c1eaa13340d959060a..c75bac45d31428e59bd577dbd96a2fa55ee80443 100644 (file)
@@ -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);