mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-29 04:06:57 +00:00
scoutfs: only release lockspace/workqueues in lock_destroy if they exist
Mount failure means these might be NULL. Signed-off-by: Mark Fasheh <mfasheh@versity.com>
This commit is contained in:
@@ -560,12 +560,15 @@ void scoutfs_lock_destroy(struct super_block *sb)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (linfo) {
|
if (linfo) {
|
||||||
|
if (linfo->downconvert_wq)
|
||||||
destroy_workqueue(linfo->downconvert_wq);
|
destroy_workqueue(linfo->downconvert_wq);
|
||||||
unregister_shrinker(&linfo->shrinker);
|
unregister_shrinker(&linfo->shrinker);
|
||||||
|
if (linfo->ls) {
|
||||||
ret = dlm_release_lockspace(linfo->ls, 2);
|
ret = dlm_release_lockspace(linfo->ls, 2);
|
||||||
if (ret)
|
if (ret)
|
||||||
scoutfs_info(sb, "Error %d releasing lockspace %s\n",
|
scoutfs_info(sb, "Error %d releasing lockspace %s\n",
|
||||||
ret, linfo->ls_name);
|
ret, linfo->ls_name);
|
||||||
|
}
|
||||||
|
|
||||||
free_lock_tree(sb);
|
free_lock_tree(sb);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user