gfs2: move msleep to sleepable context
commit ac5ee087d31ed93b6e45d2968a66828c6f621d8c upstream.
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: 4a7727725d
("GFS2: Fix recovery issues for spectators")
Suggested-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f5b9144715
commit
40aefac870
@@ -959,14 +959,15 @@ locks_done:
|
|||||||
if (sdp->sd_args.ar_spectator) {
|
if (sdp->sd_args.ar_spectator) {
|
||||||
fs_info(sdp, "Recovery is required. Waiting for a "
|
fs_info(sdp, "Recovery is required. Waiting for a "
|
||||||
"non-spectator to mount.\n");
|
"non-spectator to mount.\n");
|
||||||
|
spin_unlock(&ls->ls_recover_spin);
|
||||||
msleep_interruptible(1000);
|
msleep_interruptible(1000);
|
||||||
} else {
|
} else {
|
||||||
fs_info(sdp, "control_mount wait1 block %u start %u "
|
fs_info(sdp, "control_mount wait1 block %u start %u "
|
||||||
"mount %u lvb %u flags %lx\n", block_gen,
|
"mount %u lvb %u flags %lx\n", block_gen,
|
||||||
start_gen, mount_gen, lvb_gen,
|
start_gen, mount_gen, lvb_gen,
|
||||||
ls->ls_recover_flags);
|
ls->ls_recover_flags);
|
||||||
|
spin_unlock(&ls->ls_recover_spin);
|
||||||
}
|
}
|
||||||
spin_unlock(&ls->ls_recover_spin);
|
|
||||||
goto restart;
|
goto restart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user