diff options
Diffstat (limited to 'fs/gfs2/lock_dlm.c')
-rw-r--r-- | fs/gfs2/lock_dlm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index cdd0755d7823..0e5e0e7022e5 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c | |||
@@ -167,15 +167,16 @@ static unsigned int gdlm_lock(struct gfs2_glock *gl, | |||
167 | return LM_OUT_ASYNC; | 167 | return LM_OUT_ASYNC; |
168 | } | 168 | } |
169 | 169 | ||
170 | static void gdlm_put_lock(struct kmem_cache *cachep, void *ptr) | 170 | static void gdlm_put_lock(struct kmem_cache *cachep, struct gfs2_glock *gl) |
171 | { | 171 | { |
172 | struct gfs2_glock *gl = ptr; | ||
173 | struct gfs2_sbd *sdp = gl->gl_sbd; | 172 | struct gfs2_sbd *sdp = gl->gl_sbd; |
174 | struct lm_lockstruct *ls = &sdp->sd_lockstruct; | 173 | struct lm_lockstruct *ls = &sdp->sd_lockstruct; |
175 | int error; | 174 | int error; |
176 | 175 | ||
177 | if (gl->gl_lksb.sb_lkid == 0) { | 176 | if (gl->gl_lksb.sb_lkid == 0) { |
178 | kmem_cache_free(cachep, gl); | 177 | kmem_cache_free(cachep, gl); |
178 | if (atomic_dec_and_test(&sdp->sd_glock_disposal)) | ||
179 | wake_up(&sdp->sd_glock_wait); | ||
179 | return; | 180 | return; |
180 | } | 181 | } |
181 | 182 | ||
@@ -187,7 +188,6 @@ static void gdlm_put_lock(struct kmem_cache *cachep, void *ptr) | |||
187 | (unsigned long long)gl->gl_name.ln_number, error); | 188 | (unsigned long long)gl->gl_name.ln_number, error); |
188 | return; | 189 | return; |
189 | } | 190 | } |
190 | atomic_inc(&sdp->sd_glock_disposal); | ||
191 | } | 191 | } |
192 | 192 | ||
193 | static void gdlm_cancel(struct gfs2_glock *gl) | 193 | static void gdlm_cancel(struct gfs2_glock *gl) |