瀏覽代碼

GFS2: Fix journal check for spectator mounts

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>
Steven Whitehouse 14 年之前
父節點
當前提交
d0795f9123
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      fs/gfs2/recovery.c

+ 2 - 1
fs/gfs2/recovery.c

@@ -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);