Skip to content

Commit 3b99996

Browse files
committed
gfs2: Initialize gl_no_formal_ino earlier
jira LE-3201 Rebuild_History Non-Buildable kernel-rt-4.18.0-553.27.1.rt7.368.el8_10 commit-author Andreas Gruenbacher <agruenba@redhat.com> commit 1072b3a Set gl_no_formal_ino of the iopen glock to the generation of the associated inode (ip->i_no_formal_ino) as soon as that value is known. This saves us from setting it later, possibly repeatedly, when queuing GLF_VERIFY_DELETE work. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> (cherry picked from commit 1072b3a) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 79ad6cc commit 3b99996

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

fs/gfs2/glock.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,6 @@ static bool gfs2_try_evict(struct gfs2_glock *gl)
945945
ip = NULL;
946946
spin_unlock(&gl->gl_lockref.lock);
947947
if (ip) {
948-
gl->gl_no_formal_ino = ip->i_no_formal_ino;
949948
set_bit(GIF_DEFERRED_DELETE, &ip->i_flags);
950949
d_prune_aliases(&ip->i_inode);
951950
iput(&ip->i_inode);

fs/gfs2/glops.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,11 +491,18 @@ int gfs2_inode_refresh(struct gfs2_inode *ip)
491491
static int inode_go_instantiate(struct gfs2_glock *gl)
492492
{
493493
struct gfs2_inode *ip = gl->gl_object;
494+
struct gfs2_glock *io_gl;
495+
int error;
494496

495497
if (!ip) /* no inode to populate - read it in later */
496498
return 0;
497499

498-
return gfs2_inode_refresh(ip);
500+
error = gfs2_inode_refresh(ip);
501+
if (error)
502+
return error;
503+
io_gl = ip->i_iopen_gh.gh_gl;
504+
io_gl->gl_no_formal_ino = ip->i_no_formal_ino;
505+
return 0;
499506
}
500507

501508
static int inode_go_held(struct gfs2_holder *gh)

fs/gfs2/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
741741
if (error)
742742
goto fail_free_inode;
743743
gfs2_cancel_delete_work(io_gl);
744+
io_gl->gl_no_formal_ino = ip->i_no_formal_ino;
744745

745746
retry:
746747
error = insert_inode_locked4(inode, ip->i_no_addr, iget_test, &ip->i_no_addr);

0 commit comments

Comments
 (0)