Skip to content

Commit 2e344c6

Browse files
committed
Reinstate "GFS2: free disk inode which is deleted by remote node -V2"
jira LE-1907 Rebuild_History Non-Buildable kernel-4.18.0-477.10.1.el8_8 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 533d2f6 commit 2e344c6

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
@@ -109,8 +109,26 @@ static int gfs2_dhash(const struct dentry *dentry, struct qstr *str)
109109
return 0;
110110
}
111111

112+
static int gfs2_dentry_delete(const struct dentry *dentry)
113+
{
114+
struct gfs2_inode *ginode;
115+
116+
if (d_really_is_negative(dentry))
117+
return 0;
118+
119+
ginode = GFS2_I(d_inode(dentry));
120+
if (!gfs2_holder_initialized(&ginode->i_iopen_gh))
121+
return 0;
122+
123+
if (test_bit(GLF_DEMOTE, &ginode->i_iopen_gh.gh_gl->gl_flags))
124+
return 1;
125+
126+
return 0;
127+
}
128+
112129
const struct dentry_operations gfs2_dops = {
113130
.d_revalidate = gfs2_drevalidate,
114131
.d_hash = gfs2_dhash,
132+
.d_delete = gfs2_dentry_delete,
115133
};
116134

0 commit comments

Comments
 (0)