]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
gfs2: change go_lock to go_instantiate
authorBob Peterson <rpeterso@redhat.com>
Wed, 29 Sep 2021 20:06:21 +0000 (15:06 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 25 Oct 2021 06:42:18 +0000 (08:42 +0200)
Before this patch, the go_lock glock operations (glops) did not do
any actual locking. They were used to instantiate objects, like reading
in dinodes and rgrps from the media.

This patch renames the functions to go_instantiate for clarity.

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/incore.h
fs/gfs2/rgrp.c
fs/gfs2/rgrp.h

index 54a1ed373ff3ae3e57eef14e0b50551e2f4c65ea..7053628d129e3fc120da9524acaa6d6a6fe095af 100644 (file)
@@ -501,11 +501,11 @@ restart:
                                first_gh = gh;
                        }
                        if (gh->gh_list.prev == &gl->gl_holders &&
-                           glops->go_lock) {
+                           glops->go_instantiate) {
                                if (!(gh->gh_flags & GL_SKIP)) {
                                        spin_unlock(&gl->gl_lockref.lock);
                                        /* FIXME: eliminate this eventually */
-                                       ret = glops->go_lock(gh);
+                                       ret = glops->go_instantiate(gh);
                                        spin_lock(&gl->gl_lockref.lock);
                                        if (ret) {
                                                if (ret == 1)
index 4b19f513570f7e2dd056b560078e4cc60218cbaf..8452a83bd55aa12e31e1157b9a7dba79e9d52341 100644 (file)
@@ -482,13 +482,13 @@ int gfs2_inode_refresh(struct gfs2_inode *ip)
 }
 
 /**
- * inode_go_lock - operation done after an inode lock is locked by a process
+ * inode_go_instantiate - read in an inode if necessary
  * @gh: The glock holder
  *
  * Returns: errno
  */
 
-static int inode_go_lock(struct gfs2_holder *gh)
+static int inode_go_instantiate(struct gfs2_holder *gh)
 {
        struct gfs2_glock *gl = gh->gh_gl;
        struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
@@ -740,7 +740,7 @@ const struct gfs2_glock_operations gfs2_inode_glops = {
        .go_sync = inode_go_sync,
        .go_inval = inode_go_inval,
        .go_demote_ok = inode_go_demote_ok,
-       .go_lock = inode_go_lock,
+       .go_instantiate = inode_go_instantiate,
        .go_dump = inode_go_dump,
        .go_type = LM_TYPE_INODE,
        .go_flags = GLOF_ASPACE | GLOF_LRU | GLOF_LVB,
@@ -750,7 +750,7 @@ const struct gfs2_glock_operations gfs2_inode_glops = {
 const struct gfs2_glock_operations gfs2_rgrp_glops = {
        .go_sync = rgrp_go_sync,
        .go_inval = rgrp_go_inval,
-       .go_lock = gfs2_rgrp_go_lock,
+       .go_instantiate = gfs2_rgrp_go_instantiate,
        .go_dump = gfs2_rgrp_go_dump,
        .go_type = LM_TYPE_RGRP,
        .go_flags = GLOF_LVB,
index ca42d310fd4d6198952b1550cad3482808dac5e5..af632dc6523100910c9eca21991a5f13f8a35dd8 100644 (file)
@@ -220,7 +220,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_lock) (struct gfs2_holder *gh);
+       int (*go_instantiate) (struct gfs2_holder *gh);
        void (*go_dump)(struct seq_file *seq, struct gfs2_glock *gl,
                        const char *fs_id_buf);
        void (*go_callback)(struct gfs2_glock *gl, bool remote);
index 96b2fbed6bf1f2312374d88963e42efb9ac212c3..cdcbc822064d6dada46e3d1a84d2b9cc4761f9e8 100644 (file)
@@ -1288,7 +1288,7 @@ static int update_rgrp_lvb(struct gfs2_rgrpd *rgd)
        return 0;
 }
 
-int gfs2_rgrp_go_lock(struct gfs2_holder *gh)
+int gfs2_rgrp_go_instantiate(struct gfs2_holder *gh)
 {
        struct gfs2_rgrpd *rgd = gh->gh_gl->gl_object;
 
index a6855fd796e03d0efb6dad0caf9f021673b3ef2a..3e2ca1fb43056c6520913357ec5ba10d9fdf7566 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_lock(struct gfs2_holder *gh);
+extern int gfs2_rgrp_go_instantiate(struct gfs2_holder *gh);
 extern void gfs2_rgrp_brelse(struct gfs2_rgrpd *rgd);
 
 extern struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip);