lock_dlm.c (018cbffe6819f6f8db20a0a3acd9bab9bfd667e4) | lock_dlm.c (009d851837ab26cab18adda6169a813f70b0b21b) |
---|---|
1/* 2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 3 * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved. 4 * 5 * This copyrighted material is made available to anyone wishing to use, 6 * modify, copy, or redistribute it subject to the terms and conditions 7 * of the GNU General Public License version 2. 8 */ --- 16 unchanged lines hidden (view full) --- 25 26 BUG_ON(gl->gl_lksb.sb_flags & DLM_SBF_DEMOTED); 27 28 if (gl->gl_lksb.sb_flags & DLM_SBF_VALNOTVALID) 29 memset(gl->gl_lvb, 0, GDLM_LVB_SIZE); 30 31 switch (gl->gl_lksb.sb_status) { 32 case -DLM_EUNLOCK: /* Unlocked, so glock can be freed */ | 1/* 2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 3 * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved. 4 * 5 * This copyrighted material is made available to anyone wishing to use, 6 * modify, copy, or redistribute it subject to the terms and conditions 7 * of the GNU General Public License version 2. 8 */ --- 16 unchanged lines hidden (view full) --- 25 26 BUG_ON(gl->gl_lksb.sb_flags & DLM_SBF_DEMOTED); 27 28 if (gl->gl_lksb.sb_flags & DLM_SBF_VALNOTVALID) 29 memset(gl->gl_lvb, 0, GDLM_LVB_SIZE); 30 31 switch (gl->gl_lksb.sb_status) { 32 case -DLM_EUNLOCK: /* Unlocked, so glock can be freed */ |
33 kmem_cache_free(gfs2_glock_cachep, gl); | 33 if (gl->gl_ops->go_flags & GLOF_ASPACE) 34 kmem_cache_free(gfs2_glock_aspace_cachep, gl); 35 else 36 kmem_cache_free(gfs2_glock_cachep, gl); |
34 if (atomic_dec_and_test(&sdp->sd_glock_disposal)) 35 wake_up(&sdp->sd_glock_wait); 36 return; 37 case -DLM_ECANCEL: /* Cancel while getting lock */ 38 ret |= LM_OUT_CANCELED; 39 goto out; 40 case -EAGAIN: /* Try lock fails */ 41 goto out; --- 205 unchanged lines hidden --- | 37 if (atomic_dec_and_test(&sdp->sd_glock_disposal)) 38 wake_up(&sdp->sd_glock_wait); 39 return; 40 case -DLM_ECANCEL: /* Cancel while getting lock */ 41 ret |= LM_OUT_CANCELED; 42 goto out; 43 case -EAGAIN: /* Try lock fails */ 44 goto out; --- 205 unchanged lines hidden --- |