]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gfs2: fix remote evict for read-only filesystems
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 19 Nov 2025 12:14:24 +0000 (12:14 +0000)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 26 Nov 2025 23:50:53 +0000 (23:50 +0000)
When a node tries to delete an inode, it first requests exclusive access
to the iopen glock.  This triggers demote requests on all remote nodes
currently holding the iopen glock.  To satisfy those requests, the
remote nodes evict the inode in question, or they poke the corresponding
inode glock to signal that the inode is still in active use.

This behavior doesn't depend on whether or not a filesystem is
read-only, so remove the incorrect read-only check.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glops.c

index 0c0a80b3bacab29c0eff2f4f5b749245ca57c615..0c68ab4432b08aa040b2d5daef433c17c8251dbb 100644 (file)
@@ -630,8 +630,7 @@ static void iopen_go_callback(struct gfs2_glock *gl, bool remote)
        struct gfs2_inode *ip = gl->gl_object;
        struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
 
-       if (!remote || sb_rdonly(sdp->sd_vfs) ||
-           test_bit(SDF_KILL, &sdp->sd_flags))
+       if (!remote || test_bit(SDF_KILL, &sdp->sd_flags))
                return;
 
        if (gl->gl_demote_state == LM_ST_UNLOCKED &&