Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359313
b: refs/heads/master
c: cda9540
h: refs/heads/master
i:
  359311: ee26a64
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Feb 28, 2013
1 parent 508b300 commit ef4652c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a15abcc961426c9e560bec26785e05b68154c474
refs/heads/master: cda95406c8fe491c01b3abc422c25a613e9f36ea
23 changes: 10 additions & 13 deletions trunk/fs/dlm/recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,23 +351,20 @@ static struct dlm_rsb *recover_idr_find(struct dlm_ls *ls, uint64_t id)
return r;
}

static int recover_idr_clear_rsb(int id, void *p, void *data)
static void recover_idr_clear(struct dlm_ls *ls)
{
struct dlm_ls *ls = data;
struct dlm_rsb *r = p;
struct dlm_rsb *r;
int id;

r->res_id = 0;
r->res_recover_locks_count = 0;
ls->ls_recover_list_count--;
spin_lock(&ls->ls_recover_idr_lock);

dlm_put_rsb(r);
return 0;
}
idr_for_each_entry(&ls->ls_recover_idr, r, id) {
r->res_id = 0;
r->res_recover_locks_count = 0;
ls->ls_recover_list_count--;

static void recover_idr_clear(struct dlm_ls *ls)
{
spin_lock(&ls->ls_recover_idr_lock);
idr_for_each(&ls->ls_recover_idr, recover_idr_clear_rsb, ls);
dlm_put_rsb(r);
}
idr_remove_all(&ls->ls_recover_idr);

if (ls->ls_recover_list_count != 0) {
Expand Down

0 comments on commit ef4652c

Please sign in to comment.