Skip to content

Commit

Permalink
[DLM] recover_locks not clearing NEW_MASTER flag
Browse files Browse the repository at this point in the history
When there are no locks on a resource, the recover_locks() function fails
to clear the NEW_MASTER flag by going directly to out, missing the line
that clears the flag.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Aug 24, 2006
1 parent f588875 commit 233e515
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions fs/dlm/recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,22 +473,11 @@ static int recover_locks_queue(struct dlm_rsb *r, struct list_head *head)
return error;
}

static int all_queues_empty(struct dlm_rsb *r)
{
if (!list_empty(&r->res_grantqueue) ||
!list_empty(&r->res_convertqueue) ||
!list_empty(&r->res_waitqueue))
return 0;
return 1;
}

static int recover_locks(struct dlm_rsb *r)
{
int error = 0;

lock_rsb(r);
if (all_queues_empty(r))
goto out;

DLM_ASSERT(!r->res_recover_locks_count, dlm_dump_rsb(r););

Expand Down

0 comments on commit 233e515

Please sign in to comment.