]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - fs/gfs2/glock.c
gfs2: fix scheduling while atomic bug in glocks
[mirror_ubuntu-hirsute-kernel.git] / fs / gfs2 / glock.c
index d87a5bc3607b75280a270a97cc309dce2fbb8443..68fc25d48f0c697228a1ee41c53de8ec12fb5f6b 100644 (file)
@@ -1451,9 +1451,11 @@ void gfs2_glock_dq(struct gfs2_holder *gh)
            glock_blocked_by_withdraw(gl) &&
            gh->gh_gl != sdp->sd_jinode_gl) {
                sdp->sd_glock_dqs_held++;
+               spin_unlock(&gl->gl_lockref.lock);
                might_sleep();
                wait_on_bit(&sdp->sd_flags, SDF_WITHDRAW_RECOVERY,
                            TASK_UNINTERRUPTIBLE);
+               spin_lock(&gl->gl_lockref.lock);
        }
        if (gh->gh_flags & GL_NOCACHE)
                handle_callback(gl, LM_ST_UNLOCKED, 0, false);