mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
[DLM] fix loop in grant_after_purge
The loop in grant_after_purge is intended to find all rsb's in each hash bucket that have the LOCKS_PURGED flag set. The loop was quitting the current bucket after finding just one rsb instead of going until there are no more. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
parent
f7da790d74
commit
2b4e926aab
1 changed files with 9 additions and 4 deletions
|
@ -3366,12 +3366,16 @@ static struct dlm_rsb *find_purged_rsb(struct dlm_ls *ls, int bucket)
|
||||||
void dlm_grant_after_purge(struct dlm_ls *ls)
|
void dlm_grant_after_purge(struct dlm_ls *ls)
|
||||||
{
|
{
|
||||||
struct dlm_rsb *r;
|
struct dlm_rsb *r;
|
||||||
int i;
|
int bucket = 0;
|
||||||
|
|
||||||
for (i = 0; i < ls->ls_rsbtbl_size; i++) {
|
while (1) {
|
||||||
r = find_purged_rsb(ls, i);
|
r = find_purged_rsb(ls, bucket);
|
||||||
if (!r)
|
if (!r) {
|
||||||
|
if (bucket == ls->ls_rsbtbl_size - 1)
|
||||||
|
break;
|
||||||
|
bucket++;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
lock_rsb(r);
|
lock_rsb(r);
|
||||||
if (is_master(r)) {
|
if (is_master(r)) {
|
||||||
grant_pending_locks(r);
|
grant_pending_locks(r);
|
||||||
|
@ -3379,6 +3383,7 @@ void dlm_grant_after_purge(struct dlm_ls *ls)
|
||||||
}
|
}
|
||||||
unlock_rsb(r);
|
unlock_rsb(r);
|
||||||
put_rsb(r);
|
put_rsb(r);
|
||||||
|
schedule();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue