提交 9d9b1605 编写于 作者: B Bob Peterson

gfs2: Fix glock recursion in freeze_go_xmote_bh

We must not call gfs2_consist (which does a file system withdraw) from
the freeze glock's freeze_go_xmote_bh function because the withdraw
will try to use the freeze glock, thus causing a glock recursion error.

This patch changes freeze_go_xmote_bh to call function
gfs2_assert_withdraw_delayed instead of gfs2_consist to avoid recursion.
Signed-off-by: NBob Peterson <rpeterso@redhat.com>
上级 a6579cbf
...@@ -610,16 +610,13 @@ static int freeze_go_xmote_bh(struct gfs2_glock *gl) ...@@ -610,16 +610,13 @@ static int freeze_go_xmote_bh(struct gfs2_glock *gl)
j_gl->gl_ops->go_inval(j_gl, DIO_METADATA); j_gl->gl_ops->go_inval(j_gl, DIO_METADATA);
error = gfs2_find_jhead(sdp->sd_jdesc, &head, false); error = gfs2_find_jhead(sdp->sd_jdesc, &head, false);
if (error) if (gfs2_assert_withdraw_delayed(sdp, !error))
gfs2_consist(sdp); return error;
if (!(head.lh_flags & GFS2_LOG_HEAD_UNMOUNT)) if (gfs2_assert_withdraw_delayed(sdp, head.lh_flags &
gfs2_consist(sdp); GFS2_LOG_HEAD_UNMOUNT))
return -EIO;
/* Initialize some head of the log stuff */ sdp->sd_log_sequence = head.lh_sequence + 1;
if (!gfs2_withdrawn(sdp)) { gfs2_log_pointers_init(sdp, head.lh_blkno);
sdp->sd_log_sequence = head.lh_sequence + 1;
gfs2_log_pointers_init(sdp, head.lh_blkno);
}
} }
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册