diff options
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 77e4e6169a0d..9229e04362f6 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -2730,14 +2730,17 @@ int dlm_empty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) | |||
2730 | int ret; | 2730 | int ret; |
2731 | int lock_dropped = 0; | 2731 | int lock_dropped = 0; |
2732 | 2732 | ||
2733 | spin_lock(&res->spinlock); | ||
2733 | if (res->owner != dlm->node_num) { | 2734 | if (res->owner != dlm->node_num) { |
2734 | if (!__dlm_lockres_unused(res)) { | 2735 | if (!__dlm_lockres_unused(res)) { |
2735 | mlog(ML_ERROR, "%s:%.*s: this node is not master, " | 2736 | mlog(ML_ERROR, "%s:%.*s: this node is not master, " |
2736 | "trying to free this but locks remain\n", | 2737 | "trying to free this but locks remain\n", |
2737 | dlm->name, res->lockname.len, res->lockname.name); | 2738 | dlm->name, res->lockname.len, res->lockname.name); |
2738 | } | 2739 | } |
2740 | spin_unlock(&res->spinlock); | ||
2739 | goto leave; | 2741 | goto leave; |
2740 | } | 2742 | } |
2743 | spin_unlock(&res->spinlock); | ||
2741 | 2744 | ||
2742 | /* Wheee! Migrate lockres here! Will sleep so drop spinlock. */ | 2745 | /* Wheee! Migrate lockres here! Will sleep so drop spinlock. */ |
2743 | spin_unlock(&dlm->spinlock); | 2746 | spin_unlock(&dlm->spinlock); |