提交 a08fd280 编写于 作者: B Bob Peterson 提交者: Steven Whitehouse

GFS2: Unlock rindex mutex on glock error

This patch fixes an error path in function gfs2_rindex_update
that leaves the rindex mutex held.
Signed-off-by: NBob Peterson <rpeterso@redhat.com>
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 08728f2d
......@@ -699,13 +699,14 @@ int gfs2_rindex_update(struct gfs2_sbd *sdp)
if (!gfs2_glock_is_locked_by_me(gl)) {
error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh);
if (error)
return error;
goto out_unlock;
unlock_required = 1;
}
if (!sdp->sd_rindex_uptodate)
error = gfs2_ri_update(ip);
if (unlock_required)
gfs2_glock_dq_uninit(&ri_gh);
out_unlock:
mutex_unlock(&sdp->sd_rindex_mutex);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册