Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38808
b: refs/heads/master
c: 899be4d
h: refs/heads/master
v: v3
  • Loading branch information
Steven Whitehouse committed Aug 30, 2006
1 parent 565c348 commit 4a4dac4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6a53727683bbf993c01ab49b45e0eac17e23df1
refs/heads/master: 899be4d3b7e00bf364d84c1c8cfe8bbbd1e3507b
9 changes: 6 additions & 3 deletions trunk/fs/gfs2/glock.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ static inline int queue_empty(struct gfs2_glock *gl, struct list_head *head)
*/

static struct gfs2_glock *search_bucket(struct gfs2_gl_hash_bucket *bucket,
const struct gfs2_sbd *sdp,
const struct lm_lockname *name)
{
struct gfs2_glock *gl;
Expand All @@ -209,6 +210,8 @@ static struct gfs2_glock *search_bucket(struct gfs2_gl_hash_bucket *bucket,
continue;
if (!lm_name_equal(&gl->gl_name, name))
continue;
if (gl->gl_sbd != sdp)
continue;

kref_get(&gl->gl_ref);

Expand All @@ -233,7 +236,7 @@ static struct gfs2_glock *gfs2_glock_find(struct gfs2_sbd *sdp,
struct gfs2_glock *gl;

read_lock(&bucket->hb_lock);
gl = search_bucket(bucket, name);
gl = search_bucket(bucket, sdp, name);
read_unlock(&bucket->hb_lock);

return gl;
Expand Down Expand Up @@ -266,7 +269,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, uint64_t number,
bucket = &sdp->sd_gl_hash[gl_hash(&name)];

read_lock(&bucket->hb_lock);
gl = search_bucket(bucket, &name);
gl = search_bucket(bucket, sdp, &name);
read_unlock(&bucket->hb_lock);

if (gl || !create) {
Expand Down Expand Up @@ -311,7 +314,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, uint64_t number,
goto fail_aspace;

write_lock(&bucket->hb_lock);
tmp = search_bucket(bucket, &name);
tmp = search_bucket(bucket, sdp, &name);
if (tmp) {
write_unlock(&bucket->hb_lock);
glock_free(gl);
Expand Down

0 comments on commit 4a4dac4

Please sign in to comment.