Commit ac5ee087 authored by Alexander Aring's avatar Alexander Aring Committed by Andreas Gruenbacher
Browse files

gfs2: move msleep to sleepable context



This patch moves the msleep_interruptible() out of the non-sleepable
context by moving the ls->ls_recover_spin spinlock around so
msleep_interruptible() will be called in a sleepable context.

Cc: stable@vger.kernel.org
Fixes: 4a772772 ("GFS2: Fix recovery issues for spectators")
Suggested-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 9c32cda4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -996,14 +996,15 @@ static int control_mount(struct gfs2_sbd *sdp)
		if (sdp->sd_args.ar_spectator) {
			fs_info(sdp, "Recovery is required. Waiting for a "
				"non-spectator to mount.\n");
			spin_unlock(&ls->ls_recover_spin);
			msleep_interruptible(1000);
		} else {
			fs_info(sdp, "control_mount wait1 block %u start %u "
				"mount %u lvb %u flags %lx\n", block_gen,
				start_gen, mount_gen, lvb_gen,
				ls->ls_recover_flags);
		}
			spin_unlock(&ls->ls_recover_spin);
		}
		goto restart;
	}