Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

David Teigland and committed by
Steven Whitehouse
d4e0bfec 949db153

+6 -1
+6 -1
fs/gfs2/lock_dlm.c
··· 281 281 { 282 282 struct gfs2_sbd *sdp = gl->gl_sbd; 283 283 struct lm_lockstruct *ls = &sdp->sd_lockstruct; 284 + int lvb_needs_unlock = 0; 284 285 int error; 285 286 286 287 if (gl->gl_lksb.sb_lkid == 0) { ··· 295 294 gfs2_update_request_times(gl); 296 295 297 296 /* don't want to skip dlm_unlock writing the lvb when lock is ex */ 297 + 298 + if (gl->gl_lksb.sb_lvbptr && (gl->gl_state == LM_ST_EXCLUSIVE)) 299 + lvb_needs_unlock = 1; 300 + 298 301 if (test_bit(SDF_SKIP_DLM_UNLOCK, &sdp->sd_flags) && 299 - gl->gl_lksb.sb_lvbptr && (gl->gl_state != LM_ST_EXCLUSIVE)) { 302 + !lvb_needs_unlock) { 300 303 gfs2_glock_free(gl); 301 304 return; 302 305 }