]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - fs/gfs2/glock.c
[GFS2] Update copyright date to 2006
[mirror_ubuntu-jammy-kernel.git] / fs / gfs2 / glock.c
index 81b06812b3296700d3e3fd0a24fa61898944a576..c041590315384d43fd40ec50cd8e18fe8aa6f06a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) Sistina Software, Inc.  1997-2003 All rights reserved.
- * Copyright (C) 2004-2005 Red Hat, Inc.  All rights reserved.
+ * Copyright (C) 2004-2006 Red Hat, Inc.  All rights reserved.
  *
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
@@ -16,8 +16,8 @@
 #include <linux/sort.h>
 #include <linux/jhash.h>
 #include <linux/kref.h>
+#include <linux/kallsyms.h>
 #include <linux/gfs2_ondisk.h>
-#include <asm/semaphore.h>
 #include <asm/uaccess.h>
 
 #include "gfs2.h"
@@ -46,6 +46,8 @@ struct greedy {
 
 typedef void (*glock_examiner) (struct gfs2_glock * gl);
 
+static int gfs2_dump_lockstate(struct gfs2_sbd *sdp);
+
 /**
  * relaxed_state_ok - is a requested lock compatible with the current lock mode?
  * @actual: the current state of the lock
@@ -157,6 +159,7 @@ int gfs2_glock_put(struct gfs2_glock *gl)
        if (kref_put(&gl->gl_ref, kill_glock)) {
                list_del_init(&gl->gl_list);
                write_unlock(&bucket->hb_lock);
+               BUG_ON(spin_is_locked(&gl->gl_spin));
                glock_free(gl);
                rv = 1;
                goto out;
@@ -226,8 +229,8 @@ static struct gfs2_glock *search_bucket(struct gfs2_gl_hash_bucket *bucket,
  * Returns: NULL, or the struct gfs2_glock with the requested number
  */
 
-struct gfs2_glock *gfs2_glock_find(struct gfs2_sbd *sdp,
-                                  struct lm_lockname *name)
+static struct gfs2_glock *gfs2_glock_find(struct gfs2_sbd *sdp,
+                                         struct lm_lockname *name)
 {
        struct gfs2_gl_hash_bucket *bucket = &sdp->sd_gl_hash[gl_hash(name)];
        struct gfs2_glock *gl;
@@ -352,12 +355,13 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, uint64_t number,
  *
  */
 
-void gfs2_holder_init(struct gfs2_glock *gl, unsigned int state, int flags,
+void gfs2_holder_init(struct gfs2_glock *gl, unsigned int state, unsigned flags,
                      struct gfs2_holder *gh)
 {
        INIT_LIST_HEAD(&gh->gh_list);
        gh->gh_gl = gl;
-       gh->gh_owner = (flags & GL_NEVER_RECURSE) ? NULL : current;
+       gh->gh_ip = (unsigned long)__builtin_return_address(0);
+       gh->gh_owner = current;
        gh->gh_state = state;
        gh->gh_flags = flags;
        gh->gh_error = 0;
@@ -380,7 +384,7 @@ void gfs2_holder_init(struct gfs2_glock *gl, unsigned int state, int flags,
  *
  */
 
-void gfs2_holder_reinit(unsigned int state, int flags, struct gfs2_holder *gh)
+void gfs2_holder_reinit(unsigned int state, unsigned flags, struct gfs2_holder *gh)
 {
        gh->gh_state = state;
        gh->gh_flags = flags;
@@ -388,6 +392,7 @@ void gfs2_holder_reinit(unsigned int state, int flags, struct gfs2_holder *gh)
                gh->gh_flags |= GL_LOCAL_EXCL;
 
        gh->gh_iflags &= 1 << HIF_ALLOCED;
+       gh->gh_ip = (unsigned long)__builtin_return_address(0);
 }
 
 /**
@@ -400,6 +405,7 @@ void gfs2_holder_uninit(struct gfs2_holder *gh)
 {
        gfs2_glock_put(gh->gh_gl);
        gh->gh_gl = NULL;
+       gh->gh_ip = 0;
 }
 
 /**
@@ -416,8 +422,9 @@ void gfs2_holder_uninit(struct gfs2_holder *gh)
  * Returns: the holder structure, NULL on ENOMEM
  */
 
-struct gfs2_holder *gfs2_holder_get(struct gfs2_glock *gl, unsigned int state,
-                                   int flags, gfp_t gfp_flags)
+static struct gfs2_holder *gfs2_holder_get(struct gfs2_glock *gl,
+                                          unsigned int state,
+                                          int flags, gfp_t gfp_flags)
 {
        struct gfs2_holder *gh;
 
@@ -427,7 +434,7 @@ struct gfs2_holder *gfs2_holder_get(struct gfs2_glock *gl, unsigned int state,
 
        gfs2_holder_init(gl, state, flags, gh);
        set_bit(HIF_ALLOCED, &gh->gh_iflags);
-
+       gh->gh_ip = (unsigned long)__builtin_return_address(0);
        return gh;
 }
 
@@ -437,85 +444,12 @@ struct gfs2_holder *gfs2_holder_get(struct gfs2_glock *gl, unsigned int state,
  *
  */
 
-void gfs2_holder_put(struct gfs2_holder *gh)
+static void gfs2_holder_put(struct gfs2_holder *gh)
 {
        gfs2_holder_uninit(gh);
        kfree(gh);
 }
 
-/**
- * handle_recurse - put other holder structures (marked recursive)
- *                  into the holders list
- * @gh: the holder structure
- *
- */
-
-static void handle_recurse(struct gfs2_holder *gh)
-{
-       struct gfs2_glock *gl = gh->gh_gl;
-       struct gfs2_sbd *sdp = gl->gl_sbd;
-       struct gfs2_holder *tmp_gh, *safe;
-       int found = 0;
-
-       if (gfs2_assert_warn(sdp, gh->gh_owner))
-               return;
-
-       list_for_each_entry_safe(tmp_gh, safe, &gl->gl_waiters3, gh_list) {
-               if (tmp_gh->gh_owner != gh->gh_owner)
-                       continue;
-
-               gfs2_assert_warn(sdp,
-                                test_bit(HIF_RECURSE, &tmp_gh->gh_iflags));
-
-               list_move_tail(&tmp_gh->gh_list, &gl->gl_holders);
-               tmp_gh->gh_error = 0;
-               set_bit(HIF_HOLDER, &tmp_gh->gh_iflags);
-
-               complete(&tmp_gh->gh_wait);
-
-               found = 1;
-       }
-
-       gfs2_assert_warn(sdp, found);
-}
-
-/**
- * do_unrecurse - a recursive holder was just dropped of the waiters3 list
- * @gh: the holder
- *
- * If there is only one other recursive holder, clear its HIF_RECURSE bit.
- * If there is more than one, leave them alone.
- *
- */
-
-static void do_unrecurse(struct gfs2_holder *gh)
-{
-       struct gfs2_glock *gl = gh->gh_gl;
-       struct gfs2_sbd *sdp = gl->gl_sbd;
-       struct gfs2_holder *tmp_gh, *last_gh = NULL;
-       int found = 0;
-
-       if (gfs2_assert_warn(sdp, gh->gh_owner))
-               return;
-
-       list_for_each_entry(tmp_gh, &gl->gl_waiters3, gh_list) {
-               if (tmp_gh->gh_owner != gh->gh_owner)
-                       continue;
-
-               gfs2_assert_warn(sdp,
-                                test_bit(HIF_RECURSE, &tmp_gh->gh_iflags));
-
-               if (found)
-                       return;
-
-               found = 1;
-               last_gh = tmp_gh;
-       }
-
-       if (!gfs2_assert_warn(sdp, found))
-               clear_bit(HIF_RECURSE, &last_gh->gh_iflags);
-}
-
 /**
  * rq_mutex - process a mutex request in the queue
  * @gh: the glock holder
@@ -549,7 +483,6 @@ static int rq_promote(struct gfs2_holder *gh)
        struct gfs2_glock *gl = gh->gh_gl;
        struct gfs2_sbd *sdp = gl->gl_sbd;
        struct gfs2_glock_operations *glops = gl->gl_ops;
-       int recurse;
 
        if (!relaxed_state_ok(gl->gl_state, gh->gh_state, gh->gh_flags)) {
                if (list_empty(&gl->gl_holders)) {
@@ -575,7 +508,6 @@ static int rq_promote(struct gfs2_holder *gh)
        if (list_empty(&gl->gl_holders)) {
                set_bit(HIF_FIRST, &gh->gh_iflags);
                set_bit(GLF_LOCK, &gl->gl_flags);
-               recurse = 0;
        } else {
                struct gfs2_holder *next_gh;
                if (gh->gh_flags & GL_LOCAL_EXCL)
@@ -584,16 +516,12 @@ static int rq_promote(struct gfs2_holder *gh)
                                     gh_list);
                if (next_gh->gh_flags & GL_LOCAL_EXCL)
                         return 1;
-               recurse = test_bit(HIF_RECURSE, &gh->gh_iflags);
        }
 
        list_move_tail(&gh->gh_list, &gl->gl_holders);
        gh->gh_error = 0;
        set_bit(HIF_HOLDER, &gh->gh_iflags);
 
-       if (recurse)
-               handle_recurse(gh);
-
        complete(&gh->gh_wait);
 
        return 0;
@@ -669,7 +597,6 @@ static int rq_greedy(struct gfs2_holder *gh)
  * @gl: the glock
  *
  */
-
 static void run_queue(struct gfs2_glock *gl)
 {
        struct gfs2_holder *gh;
@@ -749,7 +676,7 @@ void gfs2_glmutex_lock(struct gfs2_glock *gl)
  * Returns: 1 if the glock is acquired
  */
 
-int gfs2_glmutex_trylock(struct gfs2_glock *gl)
+static int gfs2_glmutex_trylock(struct gfs2_glock *gl)
 {
        int acquired = 1;
 
@@ -772,6 +699,7 @@ void gfs2_glmutex_unlock(struct gfs2_glock *gl)
        spin_lock(&gl->gl_spin);
        clear_bit(GLF_LOCK, &gl->gl_flags);
        run_queue(gl);
+       BUG_ON(!spin_is_locked(&gl->gl_spin));
        spin_unlock(&gl->gl_spin);
 }
 
@@ -804,8 +732,7 @@ static void handle_callback(struct gfs2_glock *gl, unsigned int state)
        } else {
                spin_unlock(&gl->gl_spin);
 
-               new_gh = gfs2_holder_get(gl, state,
-                                        LM_FLAG_TRY | GL_NEVER_RECURSE,
+               new_gh = gfs2_holder_get(gl, state, LM_FLAG_TRY,
                                         GFP_KERNEL | __GFP_NOFAIL),
                set_bit(HIF_DEMOTE, &new_gh->gh_iflags);
                set_bit(HIF_DEALLOC, &new_gh->gh_iflags);
@@ -884,8 +811,6 @@ static void xmote_bh(struct gfs2_glock *gl, unsigned int ret)
                spin_lock(&gl->gl_spin);
                list_del_init(&gh->gh_list);
                gh->gh_error = -EIO;
-               if (test_bit(HIF_RECURSE, &gh->gh_iflags))
-                       do_unrecurse(gh);
                spin_unlock(&gl->gl_spin);
 
        } else if (test_bit(HIF_DEMOTE, &gh->gh_iflags)) {
@@ -909,8 +834,6 @@ static void xmote_bh(struct gfs2_glock *gl, unsigned int ret)
                spin_lock(&gl->gl_spin);
                list_del_init(&gh->gh_list);
                gh->gh_error = GLR_CANCELED;
-               if (test_bit(HIF_RECURSE, &gh->gh_iflags))
-                       do_unrecurse(gh);
                spin_unlock(&gl->gl_spin);
 
        } else if (relaxed_state_ok(gl->gl_state, gh->gh_state, gh->gh_flags)) {
@@ -928,8 +851,6 @@ static void xmote_bh(struct gfs2_glock *gl, unsigned int ret)
                spin_lock(&gl->gl_spin);
                list_del_init(&gh->gh_list);
                gh->gh_error = GLR_TRYFAILED;
-               if (test_bit(HIF_RECURSE, &gh->gh_iflags))
-                       do_unrecurse(gh);
                spin_unlock(&gl->gl_spin);
 
        } else {
@@ -1148,8 +1069,6 @@ static int glock_wait_internal(struct gfs2_holder *gh)
                    !list_empty(&gh->gh_list)) {
                        list_del_init(&gh->gh_list);
                        gh->gh_error = GLR_TRYFAILED;
-                       if (test_bit(HIF_RECURSE, &gh->gh_iflags))
-                               do_unrecurse(gh);
                        run_queue(gl);
                        spin_unlock(&gl->gl_spin);
                        return gh->gh_error;
@@ -1178,9 +1097,6 @@ static int glock_wait_internal(struct gfs2_holder *gh)
                        if (gh->gh_error) {
                                spin_lock(&gl->gl_spin);
                                list_del_init(&gh->gh_list);
-                               if (test_and_clear_bit(HIF_RECURSE,
-                                                      &gh->gh_iflags))
-                                       do_unrecurse(gh);
                                spin_unlock(&gl->gl_spin);
                        }
                }
@@ -1189,8 +1105,6 @@ static int glock_wait_internal(struct gfs2_holder *gh)
                gl->gl_req_gh = NULL;
                gl->gl_req_bh = NULL;
                clear_bit(GLF_LOCK, &gl->gl_flags);
-               if (test_bit(HIF_RECURSE, &gh->gh_iflags))
-                       handle_recurse(gh);
                run_queue(gl);
                spin_unlock(&gl->gl_spin);
        }
@@ -1211,37 +1125,6 @@ find_holder_by_owner(struct list_head *head, struct task_struct *owner)
        return NULL;
 }
 
-/**
- * recurse_check -
- *
- * Make sure the new holder is compatible with the pre-existing one.
- *
- */
-
-static int recurse_check(struct gfs2_holder *existing, struct gfs2_holder *new,
-                        unsigned int state)
-{
-       struct gfs2_sbd *sdp = existing->gh_gl->gl_sbd;
-
-       if (gfs2_assert_warn(sdp, (new->gh_flags & LM_FLAG_ANY) ||
-                                 !(existing->gh_flags & LM_FLAG_ANY)))
-               goto fail;
-
-       if (gfs2_assert_warn(sdp, (existing->gh_flags & GL_LOCAL_EXCL) ||
-                                 !(new->gh_flags & GL_LOCAL_EXCL)))
-               goto fail;
-
-       if (gfs2_assert_warn(sdp, relaxed_state_ok(state, new->gh_state,
-                                                  new->gh_flags)))
-               goto fail;
-
-       return 0;
-
- fail:
-       set_bit(HIF_ABORTED, &new->gh_iflags);
-       return -EINVAL;
-}
-
 /**
  * add_to_queue - Add a holder to the wait queue (but look for recursion)
  * @gh: the holder structure to add
@@ -1253,37 +1136,22 @@ static void add_to_queue(struct gfs2_holder *gh)
        struct gfs2_glock *gl = gh->gh_gl;
        struct gfs2_holder *existing;
 
-       if (!gh->gh_owner)
-               goto out;
+       BUG_ON(!gh->gh_owner);
 
        existing = find_holder_by_owner(&gl->gl_holders, gh->gh_owner);
        if (existing) {
-               if (recurse_check(existing, gh, gl->gl_state))
-                       return;
-
-               list_add_tail(&gh->gh_list, &gl->gl_holders);
-               set_bit(HIF_HOLDER, &gh->gh_iflags);
-
-               gh->gh_error = 0;
-               complete(&gh->gh_wait);
-
-               return;
+               print_symbol(KERN_WARNING "original: %s\n", existing->gh_ip);
+               print_symbol(KERN_WARNING "new: %s\n", gh->gh_ip);
+               BUG();
        }
 
        existing = find_holder_by_owner(&gl->gl_waiters3, gh->gh_owner);
        if (existing) {
-               if (recurse_check(existing, gh, existing->gh_state))
-                       return;
-
-               set_bit(HIF_RECURSE, &gh->gh_iflags);
-               set_bit(HIF_RECURSE, &existing->gh_iflags);
-
-               list_add_tail(&gh->gh_list, &gl->gl_waiters3);
-
-               return;
+               print_symbol(KERN_WARNING "original: %s\n", existing->gh_ip);
+               print_symbol(KERN_WARNING "new: %s\n", gh->gh_ip);
+               BUG();
        }
 
- out:
        if (gh->gh_flags & LM_FLAG_PRIORITY)
                list_add(&gh->gh_list, &gl->gl_waiters3);
        else
@@ -1321,7 +1189,7 @@ int gfs2_glock_nq(struct gfs2_holder *gh)
        if (!(gh->gh_flags & GL_ASYNC)) {
                error = glock_wait_internal(gh);
                if (error == GLR_CANCELED) {
-                       msleep(1000);
+                       msleep(100);
                        goto restart;
                }
        }
@@ -1350,7 +1218,7 @@ int gfs2_glock_poll(struct gfs2_holder *gh)
        else if (list_empty(&gh->gh_list)) {
                if (gh->gh_error == GLR_CANCELED) {
                        spin_unlock(&gl->gl_spin);
-                       msleep(1000);
+                       msleep(100);
                        if (gfs2_glock_nq(gh))
                                return 1;
                        return 0;
@@ -1376,7 +1244,7 @@ int gfs2_glock_wait(struct gfs2_holder *gh)
 
        error = glock_wait_internal(gh);
        if (error == GLR_CANCELED) {
-               msleep(1000);
+               msleep(100);
                gh->gh_flags &= ~GL_ASYNC;
                error = gfs2_glock_nq(gh);
        }
@@ -1435,7 +1303,8 @@ void gfs2_glock_dq(struct gfs2_holder *gh)
  *
  */
 
-void gfs2_glock_prefetch(struct gfs2_glock *gl, unsigned int state, int flags)
+static void gfs2_glock_prefetch(struct gfs2_glock *gl, unsigned int state,
+                               int flags)
 {
        struct gfs2_glock_operations *glops = gl->gl_ops;
 
@@ -1458,31 +1327,9 @@ void gfs2_glock_prefetch(struct gfs2_glock *gl, unsigned int state, int flags)
        glops->go_xmote_th(gl, state, flags);
 }
 
-/**
- * gfs2_glock_force_drop - Force a glock to be uncached
- * @gl: the glock
- *
- */
-
-void gfs2_glock_force_drop(struct gfs2_glock *gl)
-{
-       struct gfs2_holder gh;
-
-       gfs2_holder_init(gl, LM_ST_UNLOCKED, GL_NEVER_RECURSE, &gh);
-       set_bit(HIF_DEMOTE, &gh.gh_iflags);
-
-       spin_lock(&gl->gl_spin);
-       list_add_tail(&gh.gh_list, &gl->gl_waiters2);
-       run_queue(gl);
-       spin_unlock(&gl->gl_spin);
-
-       wait_for_completion(&gh.gh_wait);
-       gfs2_holder_uninit(&gh);
-}
-
 static void greedy_work(void *data)
 {
-       struct greedy *gr = (struct greedy *)data;
+       struct greedy *gr = data;
        struct gfs2_holder *gh = &gr->gr_gh;
        struct gfs2_glock *gl = gh->gh_gl;
        struct gfs2_glock_operations *glops = gl->gl_ops;
@@ -1533,7 +1380,7 @@ int gfs2_glock_be_greedy(struct gfs2_glock *gl, unsigned int time)
        }
        gh = &gr->gr_gh;
 
-       gfs2_holder_init(gl, 0, GL_NEVER_RECURSE, gh);
+       gfs2_holder_init(gl, 0, 0, gh);
        set_bit(HIF_GREEDY, &gh->gh_iflags);
        INIT_WORK(&gr->gr_work, greedy_work, gr);
 
@@ -1543,30 +1390,6 @@ int gfs2_glock_be_greedy(struct gfs2_glock *gl, unsigned int time)
        return 0;
 }
 
-/**
- * gfs2_glock_nq_init - intialize a holder and enqueue it on a glock
- * @gl: the glock
- * @state: the state we're requesting
- * @flags: the modifier flags
- * @gh: the holder structure
- *
- * Returns: 0, GLR_*, or errno
- */
-
-int gfs2_glock_nq_init(struct gfs2_glock *gl, unsigned int state, int flags,
-                      struct gfs2_holder *gh)
-{
-       int error;
-
-       gfs2_holder_init(gl, state, flags, gh);
-
-       error = gfs2_glock_nq(gh);
-       if (error)
-               gfs2_holder_uninit(gh);
-
-       return error;
-}
-
 /**
  * gfs2_glock_dq_uninit - dequeue a holder from a glock and initialize it
  * @gh: the holder structure
@@ -1855,6 +1678,7 @@ void gfs2_lvb_unhold(struct gfs2_glock *gl)
        gfs2_glock_put(gl);
 }
 
+#if 0
 void gfs2_lvb_sync(struct gfs2_glock *gl)
 {
        gfs2_glmutex_lock(gl);
@@ -1865,6 +1689,7 @@ void gfs2_lvb_sync(struct gfs2_glock *gl)
 
        gfs2_glmutex_unlock(gl);
 }
+#endif  /*  0  */
 
 static void blocking_cb(struct gfs2_sbd *sdp, struct lm_lockname *name,
                        unsigned int state)
@@ -1903,19 +1728,19 @@ void gfs2_glock_cb(lm_fsdata_t *fsdata, unsigned int type, void *data)
 
        switch (type) {
        case LM_CB_NEED_E:
-               blocking_cb(sdp, (struct lm_lockname *)data, LM_ST_UNLOCKED);
+               blocking_cb(sdp, data, LM_ST_UNLOCKED);
                return;
 
        case LM_CB_NEED_D:
-               blocking_cb(sdp, (struct lm_lockname *)data, LM_ST_DEFERRED);
+               blocking_cb(sdp, data, LM_ST_DEFERRED);
                return;
 
        case LM_CB_NEED_S:
-               blocking_cb(sdp, (struct lm_lockname *)data, LM_ST_SHARED);
+               blocking_cb(sdp, data, LM_ST_SHARED);
                return;
 
        case LM_CB_ASYNC: {
-               struct lm_async_cb *async = (struct lm_async_cb *)data;
+               struct lm_async_cb *async = data;
                struct gfs2_glock *gl;
 
                gl = gfs2_glock_find(sdp, &async->lc_name);
@@ -1924,7 +1749,6 @@ void gfs2_glock_cb(lm_fsdata_t *fsdata, unsigned int type, void *data)
                if (!gfs2_assert_warn(sdp, gl->gl_req_bh))
                        gl->gl_req_bh(gl, async->lc_ret);
                gfs2_glock_put(gl);
-
                return;
        }
 
@@ -1973,7 +1797,7 @@ void gfs2_try_toss_inode(struct gfs2_sbd *sdp, struct gfs2_inum *inum)
        if (atomic_read(&ip->i_count))
                goto out_unlock;
 
-       gfs2_inode_destroy(ip);
+       gfs2_inode_destroy(ip, 1);
 
  out_unlock:
        gfs2_glmutex_unlock(gl);
@@ -2099,7 +1923,7 @@ void gfs2_reclaim_glock(struct gfs2_sbd *sdp)
                if (gl->gl_ops == &gfs2_inode_glops) {
                        struct gfs2_inode *ip = gl->gl_object;
                        if (ip && !atomic_read(&ip->i_count))
-                               gfs2_inode_destroy(ip);
+                               gfs2_inode_destroy(ip, 1);
                }
                if (queue_empty(gl, &gl->gl_holders) &&
                    gl->gl_state != LM_ST_UNLOCKED &&
@@ -2231,16 +2055,18 @@ static void clear_glock(struct gfs2_glock *gl)
        if (!list_empty(&gl->gl_reclaim)) {
                list_del_init(&gl->gl_reclaim);
                atomic_dec(&sdp->sd_reclaim_count);
+               spin_unlock(&sdp->sd_reclaim_lock);
                released = gfs2_glock_put(gl);
                gfs2_assert(sdp, !released);
+       } else {
+               spin_unlock(&sdp->sd_reclaim_lock);
        }
-       spin_unlock(&sdp->sd_reclaim_lock);
 
        if (gfs2_glmutex_trylock(gl)) {
                if (gl->gl_ops == &gfs2_inode_glops) {
                        struct gfs2_inode *ip = gl->gl_object;
                        if (ip && !atomic_read(&ip->i_count))
-                               gfs2_inode_destroy(ip);
+                               gfs2_inode_destroy(ip, 1);
                }
                if (queue_empty(gl, &gl->gl_holders) &&
                    gl->gl_state != LM_ST_UNLOCKED)
@@ -2298,7 +2124,7 @@ void gfs2_gl_hash_clear(struct gfs2_sbd *sdp, int wait)
                mutex_lock(&sdp->sd_invalidate_inodes_mutex);
                invalidate_inodes(sdp->sd_vfs);
                mutex_unlock(&sdp->sd_invalidate_inodes_mutex);
-               yield();
+               msleep(10);
        }
 }
 
@@ -2334,6 +2160,7 @@ static int dump_holder(char *str, struct gfs2_holder *gh)
                if (test_bit(x, &gh->gh_iflags))
                        printk(" %u", x);
        printk(" \n");
+       print_symbol(KERN_INFO "    initialized at: %s\n", gh->gh_ip);
 
        error = 0;
 
@@ -2463,7 +2290,7 @@ static int dump_glock(struct gfs2_glock *gl)
  *
  */
 
-int gfs2_dump_lockstate(struct gfs2_sbd *sdp)
+static int gfs2_dump_lockstate(struct gfs2_sbd *sdp)
 {
        struct gfs2_gl_hash_bucket *bucket;
        struct gfs2_glock *gl;