*/
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;
continue;
if (!lm_name_equal(&gl->gl_name, name))
continue;
+ if (gl->gl_sbd != sdp)
+ continue;
kref_get(&gl->gl_ref);
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;
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) {
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);