Skip to content

Commit d0b8512

Browse files
committed
Reinstate "GFS2: free disk inode which is deleted by remote node -V2"
jira LE-1907 Rebuild_History Non-Buildable kernel-rt-5.14.0-284.30.1.rt14.315.el9_2 commit-author Bob Peterson <[email protected]> commit 260595b It turns out that reverting commit 970343c ("GFS2: free disk inode which is deleted by remote node -V2") causes a regression related to evicting inodes that were unlinked on a different cluster node. We could also have simply added a call to d_mark_dontcache() to function gfs2_try_evict(), but the original pre-revert code is better tested and proven. This reverts commit 445cb12. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]> (cherry picked from commit 260595b) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 791d686 commit d0b8512

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)