diff options
| author | Alexander Aring <aahringo@redhat.com> | 2024-05-28 17:12:39 -0400 |
|---|---|---|
| committer | David Teigland <teigland@redhat.com> | 2024-05-31 11:04:54 -0500 |
| commit | fa0b54f17afe5c7449b1f0de3eb8a372f637ed30 (patch) | |
| tree | ef75a63395ad820dee7e5c607430337cf4e5a646 /fs/dlm/lockspace.c | |
| parent | f455eb8490acab680ddee79613e511e18a59c8b1 (diff) | |
| download | linux-next-fa0b54f17afe5c7449b1f0de3eb8a372f637ed30.tar.gz linux-next-fa0b54f17afe5c7449b1f0de3eb8a372f637ed30.zip | |
dlm: move recover idr to xarray datastructure
According to kdoc idr is deprecated and xarrays should be used nowadays.
This patch is moving the recover idr implementation to xarray
datastructure.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/lockspace.c')
| -rw-r--r-- | fs/dlm/lockspace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index e480dd4cd958..6f1078a1c715 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c @@ -481,8 +481,8 @@ static int new_lockspace(const char *name, const char *cluster, INIT_LIST_HEAD(&ls->ls_recover_list); spin_lock_init(&ls->ls_recover_list_lock); - idr_init(&ls->ls_recover_idr); - spin_lock_init(&ls->ls_recover_idr_lock); + xa_init_flags(&ls->ls_recover_xa, XA_FLAGS_ALLOC | XA_FLAGS_LOCK_BH); + spin_lock_init(&ls->ls_recover_xa_lock); ls->ls_recover_list_count = 0; init_waitqueue_head(&ls->ls_wait_general); INIT_LIST_HEAD(&ls->ls_masters_list); @@ -570,7 +570,7 @@ static int new_lockspace(const char *name, const char *cluster, spin_lock_bh(&lslist_lock); list_del(&ls->ls_list); spin_unlock_bh(&lslist_lock); - idr_destroy(&ls->ls_recover_idr); + xa_destroy(&ls->ls_recover_xa); kfree(ls->ls_recover_buf); out_lkbxa: xa_destroy(&ls->ls_lkbxa); @@ -736,7 +736,7 @@ static int release_lockspace(struct dlm_ls *ls, int force) dlm_delete_debug_file(ls); - idr_destroy(&ls->ls_recover_idr); + xa_destroy(&ls->ls_recover_xa); kfree(ls->ls_recover_buf); /* |
