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/dir.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/dir.c')
-rw-r--r-- | fs/dlm/dir.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c index 10753486049a..3da00c46cbb3 100644 --- a/fs/dlm/dir.c +++ b/fs/dlm/dir.c @@ -47,15 +47,13 @@ int dlm_dir_nodeid(struct dlm_rsb *r) return r->res_dir_nodeid; } -void dlm_recover_dir_nodeid(struct dlm_ls *ls) +void dlm_recover_dir_nodeid(struct dlm_ls *ls, const struct list_head *root_list) { struct dlm_rsb *r; - down_read(&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) { r->res_dir_nodeid = dlm_hash2nodeid(ls, r->res_hash); } - up_read(&ls->ls_root_sem); } int dlm_recover_directory(struct dlm_ls *ls, uint64_t seq) |