diff options
author | Sunil Mushran <sunil.mushran@oracle.com> | 2007-04-17 22:32:20 +0200 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-04-26 22:33:11 +0200 |
commit | 0d01af6e5dd6bc7abbcb6331021f8fee18005540 (patch) | |
tree | 39a5bdba2562512579a6f5e5d46c515bfc96394a /fs/ocfs2/dlm/dlmdomain.c | |
parent | ocfs2_dlm: fix race in dlm_remaster_locks (diff) | |
download | linux-0d01af6e5dd6bc7abbcb6331021f8fee18005540.tar.xz linux-0d01af6e5dd6bc7abbcb6331021f8fee18005540.zip |
ocfs2_dlm: Call cond_resched_lock() once per hash bucket scan
In dlm_migrate_all_locks(), we currently call cond_resched_lock() after
processing each lockres in a hash bucket. Move it outside the loop so as to
call it only after the entire hash bucket has been processed.
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to '')
-rw-r--r-- | fs/ocfs2/dlm/dlmdomain.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index c558442a0b44..5b9c6089082a 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c @@ -430,11 +430,10 @@ redo_bucket: dlm_lockres_put(res); - cond_resched_lock(&dlm->spinlock); - if (dropped) goto redo_bucket; } + cond_resched_lock(&dlm->spinlock); num += n; mlog(0, "%s: touched %d lockreses in bucket %d " "(tot=%d)\n", dlm->name, n, i, num); |