[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>
This commit is contained in:
Steven Whitehouse
2006-02-21 12:51:39 +00:00
parent 5c4e9e0366
commit f55ab26a8f
17 changed files with 118 additions and 118 deletions

View File

@@ -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();
}
}