diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2010-01-29 15:21:27 +0000 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2010-02-03 09:56:21 +0000 |
commit | 8f05228ee7c8f409ae3c6f9c3e13d7ccb9c18360 (patch) | |
tree | 34e8cf87485edf4ecb6878ade96704975e5d5bf5 /fs/gfs2/lock_dlm.c | |
parent | e402746a945ceb9d0486a8e3d5917c9228fa4404 (diff) | |
download | op-kernel-dev-8f05228ee7c8f409ae3c6f9c3e13d7ccb9c18360.zip op-kernel-dev-8f05228ee7c8f409ae3c6f9c3e13d7ccb9c18360.tar.gz |
GFS2: Extend umount wait coverage to full glock lifetime
Although all glocks are, by the time of the umount glock wait,
scheduled for demotion, some of them haven't made it far
enough through the process for the original set of waiting
code to wait for them.
This extends the ref count to the whole glock lifetime in order
to ensure that the waiting does catch all glocks. It does make
it a bit more invasive, but it seems the only sensible solution
at the moment.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
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 cdd0755..0e5e0e7 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, return LM_OUT_ASYNC; } -static void gdlm_put_lock(struct kmem_cache *cachep, void *ptr) +static void gdlm_put_lock(struct kmem_cache *cachep, struct gfs2_glock *gl) { - struct gfs2_glock *gl = ptr; struct gfs2_sbd *sdp = gl->gl_sbd; struct lm_lockstruct *ls = &sdp->sd_lockstruct; int error; if (gl->gl_lksb.sb_lkid == 0) { kmem_cache_free(cachep, gl); + if (atomic_dec_and_test(&sdp->sd_glock_disposal)) + wake_up(&sdp->sd_glock_wait); return; } @@ -187,7 +188,6 @@ static void gdlm_put_lock(struct kmem_cache *cachep, void *ptr) (unsigned long long)gl->gl_name.ln_number, error); return; } - atomic_inc(&sdp->sd_glock_disposal); } static void gdlm_cancel(struct gfs2_glock *gl) |