summaryrefslogtreecommitdiff
path: root/fs/gfs2/ops_fstype.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2021-07-30 12:40:25 -0500
committerBob Peterson <rpeterso@redhat.com>2021-08-20 09:03:46 -0500
commit1b8550b5de7610027609ef605f85dc29f1d9da82 (patch)
tree10b69f5ca345dad548ff9dd5f9f4fa1a5b80289a /fs/gfs2/ops_fstype.c
parentba3ca2bcf4aa20670849f621f059b3657fd7614a (diff)
gfs2: Mark journal inodes as "don't cache"
Before this patch, journal inodes were considered regular inodes, which meant that instead of evicting them, function iput_final would just put them on the lru for later processing. If the file system withdrew for whatever reason, the withdraw would never be seen until the inode was evicted, which could be indefinitely. This patch marks all journal inodes as "don't cache" which means function iput_final will evict them immediately, allowing us to properly recover the journal on other cluster nodes. Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_fstype.c')
-rw-r--r--fs/gfs2/ops_fstype.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 5b90d2b7db47..7f8410d8fdc1 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -614,6 +614,7 @@ static int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh)
break;
}
+ d_mark_dontcache(jd->jd_inode);
spin_lock(&sdp->sd_jindex_spin);
jd->jd_jid = sdp->sd_journals++;
jip = GFS2_I(jd->jd_inode);