aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glock.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-02-21 12:51:39 +0000
committerSteven Whitehouse <swhiteho@redhat.com>2006-02-21 12:51:39 +0000
commitf55ab26a8f92a23988c3e6da28dae4741933a4e2 (patch)
treeb6f9e89ce1b2ccde8d81314aeea06f6a02f882f7 /fs/gfs2/glock.c
parent[GFS2] Fix a case where we didn't get unstuffing right (diff)
downloadlinux-dev-f55ab26a8f92a23988c3e6da28dae4741933a4e2.tar.xz
linux-dev-f55ab26a8f92a23988c3e6da28dae4741933a4e2.zip
[GFS2] Use mutices rather than semaphores
As well as a number of minor bug fixes, this patch changes GFS to use mutices rather than semaphores. This results in better information in case there are any locking problems. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r--fs/gfs2/glock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 321945fde12d..4df78ecfeeb3 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -149,7 +149,7 @@ int gfs2_glock_put(struct gfs2_glock *gl)
struct gfs2_gl_hash_bucket *bucket = gl->gl_bucket;
int rv = 0;
- down(&sdp->sd_invalidate_inodes_mutex);
+ mutex_lock(&sdp->sd_invalidate_inodes_mutex);
write_lock(&bucket->hb_lock);
if (kref_put(&gl->gl_ref, kill_glock)) {
@@ -161,7 +161,7 @@ int gfs2_glock_put(struct gfs2_glock *gl)
}
write_unlock(&bucket->hb_lock);
out:
- up(&sdp->sd_invalidate_inodes_mutex);
+ mutex_unlock(&sdp->sd_invalidate_inodes_mutex);
return rv;
}
@@ -2312,9 +2312,9 @@ void gfs2_gl_hash_clear(struct gfs2_sbd *sdp, int wait)
invalidate_inodes_mutex prevents glock_put()'s during
an invalidate_inodes() */
- down(&sdp->sd_invalidate_inodes_mutex);
+ mutex_lock(&sdp->sd_invalidate_inodes_mutex);
invalidate_inodes(sdp->sd_vfs);
- up(&sdp->sd_invalidate_inodes_mutex);
+ mutex_unlock(&sdp->sd_invalidate_inodes_mutex);
yield();
}
}