diff options
author | David Teigland <teigland@redhat.com> | 2013-01-03 17:52:07 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2013-01-28 04:49:15 -0500 |
commit | d4e0bfec9b6fbb9b58640b44e01bb74ae0d29b22 (patch) | |
tree | 255f31601ba4745162979ae0cfe80530d60900ac | |
parent | 949db153b6466c6f7cad5a427ecea94985927311 (diff) |
GFS2: fix skip unlock condition
The recent commit fb6791d100d1bba20b5cdbc4912e1f7086ec60f8
included the wrong logic. The lvbptr check was incorrectly
added after the patch was tested.
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r-- | fs/gfs2/lock_dlm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index b906ed17a839..9802de0f85e6 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c | |||
@@ -281,6 +281,7 @@ static void gdlm_put_lock(struct gfs2_glock *gl) | |||
281 | { | 281 | { |
282 | struct gfs2_sbd *sdp = gl->gl_sbd; | 282 | struct gfs2_sbd *sdp = gl->gl_sbd; |
283 | struct lm_lockstruct *ls = &sdp->sd_lockstruct; | 283 | struct lm_lockstruct *ls = &sdp->sd_lockstruct; |
284 | int lvb_needs_unlock = 0; | ||
284 | int error; | 285 | int error; |
285 | 286 | ||
286 | if (gl->gl_lksb.sb_lkid == 0) { | 287 | if (gl->gl_lksb.sb_lkid == 0) { |
@@ -294,8 +295,12 @@ static void gdlm_put_lock(struct gfs2_glock *gl) | |||
294 | gfs2_update_request_times(gl); | 295 | gfs2_update_request_times(gl); |
295 | 296 | ||
296 | /* don't want to skip dlm_unlock writing the lvb when lock is ex */ | 297 | /* don't want to skip dlm_unlock writing the lvb when lock is ex */ |
298 | |||
299 | if (gl->gl_lksb.sb_lvbptr && (gl->gl_state == LM_ST_EXCLUSIVE)) | ||
300 | lvb_needs_unlock = 1; | ||
301 | |||
297 | if (test_bit(SDF_SKIP_DLM_UNLOCK, &sdp->sd_flags) && | 302 | if (test_bit(SDF_SKIP_DLM_UNLOCK, &sdp->sd_flags) && |
298 | gl->gl_lksb.sb_lvbptr && (gl->gl_state != LM_ST_EXCLUSIVE)) { | 303 | !lvb_needs_unlock) { |
299 | gfs2_glock_free(gl); | 304 | gfs2_glock_free(gl); |
300 | return; | 305 | return; |
301 | } | 306 | } |