diff options
Diffstat (limited to 'fs/ocfs2/dlm/dlmdomain.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmdomain.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index 3aff23feefdc..6ed6b95dcf93 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c | |||
@@ -451,14 +451,18 @@ redo_bucket: | |||
451 | dropped = dlm_empty_lockres(dlm, res); | 451 | dropped = dlm_empty_lockres(dlm, res); |
452 | 452 | ||
453 | spin_lock(&res->spinlock); | 453 | spin_lock(&res->spinlock); |
454 | __dlm_lockres_calc_usage(dlm, res); | 454 | if (dropped) |
455 | iter = res->hash_node.next; | 455 | __dlm_lockres_calc_usage(dlm, res); |
456 | else | ||
457 | iter = res->hash_node.next; | ||
456 | spin_unlock(&res->spinlock); | 458 | spin_unlock(&res->spinlock); |
457 | 459 | ||
458 | dlm_lockres_put(res); | 460 | dlm_lockres_put(res); |
459 | 461 | ||
460 | if (dropped) | 462 | if (dropped) { |
463 | cond_resched_lock(&dlm->spinlock); | ||
461 | goto redo_bucket; | 464 | goto redo_bucket; |
465 | } | ||
462 | } | 466 | } |
463 | cond_resched_lock(&dlm->spinlock); | 467 | cond_resched_lock(&dlm->spinlock); |
464 | num += n; | 468 | num += n; |