]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
GFS2: Fix journal check for spectator mounts
authorSteven Whitehouse <swhiteho@redhat.com>
Mon, 27 Sep 2010 14:58:11 +0000 (15:58 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 27 Sep 2010 14:58:11 +0000 (15:58 +0100)
When checking journals for spectator mounts, we cannot rely on the
journal being locked, whatever its jid might be. This patch
ensures that we always get the journal locks when checking
journals for a spectator mount.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/recovery.c

index f7f89a94a5a4598a4b532016a0c16846a62cef2b..666548e145962abdae25e150b0934f397ab84f93 100644 (file)
@@ -456,7 +456,8 @@ void gfs2_recover_func(struct work_struct *work)
        unsigned int pass;
        int error;
 
-       if (jd->jd_jid != sdp->sd_lockstruct.ls_jid) {
+       if (sdp->sd_args.ar_spectator ||
+           (jd->jd_jid != sdp->sd_lockstruct.ls_jid)) {
                fs_info(sdp, "jid=%u: Trying to acquire journal lock...\n",
                        jd->jd_jid);