GFS2: Don't use a try lock when promoting to a higher mode
Previously we marked all locks being promoted to a higher mode with the try flag to avoid any potential deadlocks issues. The DLM is able to detect these and report them in way that GFS2 can deal with them correctly. So we can just request the required mode and wait for a response without needing to perform this check. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
Родитель
d192a8e5c6
Коммит
588da3b3be
|
@ -543,11 +543,6 @@ __acquires(&gl->gl_spin)
|
||||||
clear_bit(GLF_INVALIDATE_IN_PROGRESS, &gl->gl_flags);
|
clear_bit(GLF_INVALIDATE_IN_PROGRESS, &gl->gl_flags);
|
||||||
|
|
||||||
gfs2_glock_hold(gl);
|
gfs2_glock_hold(gl);
|
||||||
if (target != LM_ST_UNLOCKED && (gl->gl_state == LM_ST_SHARED ||
|
|
||||||
gl->gl_state == LM_ST_DEFERRED) &&
|
|
||||||
!(lck_flags & (LM_FLAG_TRY | LM_FLAG_TRY_1CB)))
|
|
||||||
lck_flags |= LM_FLAG_TRY_1CB;
|
|
||||||
|
|
||||||
if (sdp->sd_lockstruct.ls_ops->lm_lock) {
|
if (sdp->sd_lockstruct.ls_ops->lm_lock) {
|
||||||
/* lock_dlm */
|
/* lock_dlm */
|
||||||
ret = sdp->sd_lockstruct.ls_ops->lm_lock(gl, target, lck_flags);
|
ret = sdp->sd_lockstruct.ls_ops->lm_lock(gl, target, lck_flags);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче