aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmthread.c
diff options
context:
space:
mode:
authorKurt Hackel <kurt.hackel@oracle.com>2006-05-01 14:51:45 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2006-06-26 17:43:04 -0400
commit6ff06a93916b3f95e83c346f7530cf2f5c68ae0c (patch)
tree7708dbb53baf65d58aa5af259b5360abf0e11d14 /fs/ocfs2/dlm/dlmthread.c
parente7e69eb38946ebef86e27442d01514fcf9c854ee (diff)
ocfs2: give the dlm dirty list a reference on the lockres
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmthread.c')
-rw-r--r--fs/ocfs2/dlm/dlmthread.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c
index 76526ea95bb2..610dc76a851b 100644
--- a/fs/ocfs2/dlm/dlmthread.c
+++ b/fs/ocfs2/dlm/dlmthread.c
@@ -455,6 +455,8 @@ void __dlm_dirty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
455 /* don't shuffle secondary queues */ 455 /* don't shuffle secondary queues */
456 if ((res->owner == dlm->node_num) && 456 if ((res->owner == dlm->node_num) &&
457 !(res->state & DLM_LOCK_RES_DIRTY)) { 457 !(res->state & DLM_LOCK_RES_DIRTY)) {
458 /* ref for dirty_list */
459 dlm_lockres_get(res);
458 list_add_tail(&res->dirty, &dlm->dirty_list); 460 list_add_tail(&res->dirty, &dlm->dirty_list);
459 res->state |= DLM_LOCK_RES_DIRTY; 461 res->state |= DLM_LOCK_RES_DIRTY;
460 } 462 }
@@ -639,6 +641,8 @@ static int dlm_thread(void *data)
639 list_del_init(&res->dirty); 641 list_del_init(&res->dirty);
640 spin_unlock(&res->spinlock); 642 spin_unlock(&res->spinlock);
641 spin_unlock(&dlm->spinlock); 643 spin_unlock(&dlm->spinlock);
644 /* Drop dirty_list ref */
645 dlm_lockres_put(res);
642 646
643 /* lockres can be re-dirtied/re-added to the 647 /* lockres can be re-dirtied/re-added to the
644 * dirty_list in this gap, but that is ok */ 648 * dirty_list in this gap, but that is ok */
@@ -691,6 +695,8 @@ in_progress:
691 /* if the lock was in-progress, stick 695 /* if the lock was in-progress, stick
692 * it on the back of the list */ 696 * it on the back of the list */
693 if (delay) { 697 if (delay) {
698 /* ref for dirty_list */
699 dlm_lockres_get(res);
694 spin_lock(&res->spinlock); 700 spin_lock(&res->spinlock);
695 list_add_tail(&res->dirty, &dlm->dirty_list); 701 list_add_tail(&res->dirty, &dlm->dirty_list);
696 res->state |= DLM_LOCK_RES_DIRTY; 702 res->state |= DLM_LOCK_RES_DIRTY;