diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dlm/lock.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 227443218167..eaad28e51ec9 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c | |||
@@ -3366,12 +3366,16 @@ static struct dlm_rsb *find_purged_rsb(struct dlm_ls *ls, int bucket) | |||
3366 | void dlm_grant_after_purge(struct dlm_ls *ls) | 3366 | void dlm_grant_after_purge(struct dlm_ls *ls) |
3367 | { | 3367 | { |
3368 | struct dlm_rsb *r; | 3368 | struct dlm_rsb *r; |
3369 | int i; | 3369 | int bucket = 0; |
3370 | 3370 | ||
3371 | for (i = 0; i < ls->ls_rsbtbl_size; i++) { | 3371 | while (1) { |
3372 | r = find_purged_rsb(ls, i); | 3372 | r = find_purged_rsb(ls, bucket); |
3373 | if (!r) | 3373 | if (!r) { |
3374 | if (bucket == ls->ls_rsbtbl_size - 1) | ||
3375 | break; | ||
3376 | bucket++; | ||
3374 | continue; | 3377 | continue; |
3378 | } | ||
3375 | lock_rsb(r); | 3379 | lock_rsb(r); |
3376 | if (is_master(r)) { | 3380 | if (is_master(r)) { |
3377 | grant_pending_locks(r); | 3381 | grant_pending_locks(r); |
@@ -3379,6 +3383,7 @@ void dlm_grant_after_purge(struct dlm_ls *ls) | |||
3379 | } | 3383 | } |
3380 | unlock_rsb(r); | 3384 | unlock_rsb(r); |
3381 | put_rsb(r); | 3385 | put_rsb(r); |
3386 | schedule(); | ||
3382 | } | 3387 | } |
3383 | } | 3388 | } |
3384 | 3389 | ||