Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Linus Torvalds committed Jan 28, 2013
2 parents ae2c3d9 + d4e0bfe commit 45e72af
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fs/gfs2/lock_dlm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}
Expand Down

0 comments on commit 45e72af

Please sign in to comment.