aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/locking/dlm/lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/locking/dlm/lock.c')
-rw-r--r--fs/gfs2/locking/dlm/lock.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/fs/gfs2/locking/dlm/lock.c b/fs/gfs2/locking/dlm/lock.c
index 894df4567a03..2482c9047505 100644
--- a/fs/gfs2/locking/dlm/lock.c
+++ b/fs/gfs2/locking/dlm/lock.c
@@ -58,9 +58,6 @@ static void gdlm_delete_lp(struct gdlm_lock *lp)
58 spin_lock(&ls->async_lock); 58 spin_lock(&ls->async_lock);
59 if (!list_empty(&lp->delay_list)) 59 if (!list_empty(&lp->delay_list))
60 list_del_init(&lp->delay_list); 60 list_del_init(&lp->delay_list);
61 gdlm_assert(!list_empty(&lp->all_list), "%x,%llx", lp->lockname.ln_type,
62 (unsigned long long)lp->lockname.ln_number);
63 list_del_init(&lp->all_list);
64 ls->all_locks_count--; 61 ls->all_locks_count--;
65 spin_unlock(&ls->async_lock); 62 spin_unlock(&ls->async_lock);
66 63
@@ -397,7 +394,6 @@ static int gdlm_create_lp(struct gdlm_ls *ls, struct lm_lockname *name,
397 INIT_LIST_HEAD(&lp->delay_list); 394 INIT_LIST_HEAD(&lp->delay_list);
398 395
399 spin_lock(&ls->async_lock); 396 spin_lock(&ls->async_lock);
400 list_add(&lp->all_list, &ls->all_locks);
401 ls->all_locks_count++; 397 ls->all_locks_count++;
402 spin_unlock(&ls->async_lock); 398 spin_unlock(&ls->async_lock);
403 399
@@ -710,22 +706,3 @@ void gdlm_submit_delayed(struct gdlm_ls *ls)
710 wake_up(&ls->thread_wait); 706 wake_up(&ls->thread_wait);
711} 707}
712 708
713int gdlm_release_all_locks(struct gdlm_ls *ls)
714{
715 struct gdlm_lock *lp, *safe;
716 int count = 0;
717
718 spin_lock(&ls->async_lock);
719 list_for_each_entry_safe(lp, safe, &ls->all_locks, all_list) {
720 list_del_init(&lp->all_list);
721
722 if (lp->lvb && lp->lvb != junk_lvb)
723 kfree(lp->lvb);
724 kfree(lp);
725 count++;
726 }
727 spin_unlock(&ls->async_lock);
728
729 return count;
730}
731