Skip to content

Commit 1e760fa

Browse files
committed
Merge tag 'gfs2-v6.3-rc3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
Pull gfs2 fix from Andreas Gruenbacher: - Reinstate commit 970343c ("GFS2: free disk inode which is deleted by remote node -V2") as reverting that commit could cause gfs2_put_super() to hang. * tag 'gfs2-v6.3-rc3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: Reinstate "GFS2: free disk inode which is deleted by remote node -V2"
2 parents 9fd6ba5 + 260595b commit 1e760fa

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

fs/gfs2/dentry.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,26 @@ static int gfs2_dhash(const struct dentry *dentry, struct qstr *str)
8383
return 0;
8484
}
8585

86+
static int gfs2_dentry_delete(const struct dentry *dentry)
87+
{
88+
struct gfs2_inode *ginode;
89+
90+
if (d_really_is_negative(dentry))
91+
return 0;
92+
93+
ginode = GFS2_I(d_inode(dentry));
94+
if (!gfs2_holder_initialized(&ginode->i_iopen_gh))
95+
return 0;
96+
97+
if (test_bit(GLF_DEMOTE, &ginode->i_iopen_gh.gh_gl->gl_flags))
98+
return 1;
99+
100+
return 0;
101+
}
102+
86103
const struct dentry_operations gfs2_dops = {
87104
.d_revalidate = gfs2_drevalidate,
88105
.d_hash = gfs2_dhash,
106+
.d_delete = gfs2_dentry_delete,
89107
};
90108

0 commit comments

Comments
 (0)