diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-05-05 07:36:38 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-05-05 07:36:38 -0400 |
commit | 588da3b3be8b3225c2dd192aa782bf6c5c32eb84 (patch) | |
tree | 857beb3294af78b926e9e5d95ed2d97b0c9c909b /fs/gfs2 | |
parent | d192a8e5c6fec4fe8cdafebccc415db4074dee88 (diff) |
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>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/glock.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index eed4b6855614..ee2178d661f5 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -543,11 +543,6 @@ __acquires(&gl->gl_spin) | |||
543 | clear_bit(GLF_INVALIDATE_IN_PROGRESS, &gl->gl_flags); | 543 | clear_bit(GLF_INVALIDATE_IN_PROGRESS, &gl->gl_flags); |
544 | 544 | ||
545 | gfs2_glock_hold(gl); | 545 | gfs2_glock_hold(gl); |
546 | if (target != LM_ST_UNLOCKED && (gl->gl_state == LM_ST_SHARED || | ||
547 | gl->gl_state == LM_ST_DEFERRED) && | ||
548 | !(lck_flags & (LM_FLAG_TRY | LM_FLAG_TRY_1CB))) | ||
549 | lck_flags |= LM_FLAG_TRY_1CB; | ||
550 | |||
551 | if (sdp->sd_lockstruct.ls_ops->lm_lock) { | 546 | if (sdp->sd_lockstruct.ls_ops->lm_lock) { |
552 | /* lock_dlm */ | 547 | /* lock_dlm */ |
553 | ret = sdp->sd_lockstruct.ls_ops->lm_lock(gl, target, lck_flags); | 548 | ret = sdp->sd_lockstruct.ls_ops->lm_lock(gl, target, lck_flags); |