diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-28 19:53:49 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-28 19:53:49 (GMT) |
commit | 45e72af09faa7dad5d8539ebac0fe317ae88318b (patch) | |
tree | 30699550096e312bceeb584bfda1325d4430db86 | |
parent | ae2c3d95faa4f75005f52051734464d4e8991612 (diff) | |
parent | d4e0bfec9b6fbb9b58640b44e01bb74ae0d29b22 (diff) | |
download | linux-45e72af09faa7dad5d8539ebac0fe317ae88318b.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes
Pull GFS2 fix from Steven Whitehouse.
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
GFS2: fix skip unlock condition
-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 b906ed1..9802de0 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) { struct gfs2_sbd *sdp = gl->gl_sbd; struct lm_lockstruct *ls = &sdp->sd_lockstruct; + int lvb_needs_unlock = 0; int error; if (gl->gl_lksb.sb_lkid == 0) { @@ -294,8 +295,12 @@ static void gdlm_put_lock(struct gfs2_glock *gl) gfs2_update_request_times(gl); /* don't want to skip dlm_unlock writing the lvb when lock is ex */ + + if (gl->gl_lksb.sb_lvbptr && (gl->gl_state == LM_ST_EXCLUSIVE)) + lvb_needs_unlock = 1; + if (test_bit(SDF_SKIP_DLM_UNLOCK, &sdp->sd_flags) && - gl->gl_lksb.sb_lvbptr && (gl->gl_state != LM_ST_EXCLUSIVE)) { + !lvb_needs_unlock) { gfs2_glock_free(gl); return; } |