diff options
author | Alexander Aring <aahringo@redhat.com> | 2024-04-02 22:18:01 +0300 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2024-04-09 19:44:49 +0300 |
commit | 3a747f4a2ee85d51b905e2df940de4a924f8060a (patch) | |
tree | 3ae4c45fffec087de34738e3d1b327575c734ebb /fs/dlm/lock.c | |
parent | aff46e0f24cd3adc54ec83f4cf834ff9ccb69307 (diff) | |
download | linux-3a747f4a2ee85d51b905e2df940de4a924f8060a.tar.xz |
dlm: move rsb root_list to ls_recover() stack
Move the rsb root_list from the lockspace to a stack variable since
it is now only used by the ls_recover() function.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/lock.c')
-rw-r--r-- | fs/dlm/lock.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index e0ab7432ca4d..43a2f4d0af53 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -5227,7 +5227,7 @@ static void purge_dead_list(struct dlm_ls *ls, struct dlm_rsb *r, /* Get rid of locks held by nodes that are gone. */ -void dlm_recover_purge(struct dlm_ls *ls) +void dlm_recover_purge(struct dlm_ls *ls, const struct list_head *root_list) { struct dlm_rsb *r; struct dlm_member *memb; @@ -5246,8 +5246,7 @@ void dlm_recover_purge(struct dlm_ls *ls) if (!nodes_count) return; - down_write(&ls->ls_root_sem); - list_for_each_entry(r, &ls->ls_root_list, res_root_list) { + list_for_each_entry(r, root_list, res_root_list) { hold_rsb(r); lock_rsb(r); if (is_master(r)) { @@ -5262,7 +5261,6 @@ void dlm_recover_purge(struct dlm_ls *ls) unhold_rsb(r); cond_resched(); } - up_write(&ls->ls_root_sem); if (lkb_count) log_rinfo(ls, "dlm_recover_purge %u locks for %u nodes", |