From: Bob Peterson Date: Wed, 29 Sep 2021 20:06:21 +0000 (-0500) Subject: gfs2: change go_lock to go_instantiate X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3278b977c9c4c51a4e5e04fb40a991fb28edc2b7;p=linux.git gfs2: change go_lock to go_instantiate 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 Signed-off-by: Andreas Gruenbacher --- diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 54a1ed373ff3a..7053628d129e3 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -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) diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 4b19f513570f7..8452a83bd55aa 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -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, diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index ca42d310fd4d6..af632dc652310 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -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); diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 96b2fbed6bf1f..cdcbc822064d6 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -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; diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h index a6855fd796e03..3e2ca1fb43056 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_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);