hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/fs/dlm/ast.c
....@@ -1,12 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /******************************************************************************
23 *******************************************************************************
34 **
45 ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
56 ** Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved.
67 **
7
-** This copyrighted material is made available to anyone wishing to use,
8
-** modify, copy, or redistribute it subject to the terms and conditions
9
-** of the GNU General Public License v.2.
108 **
119 *******************************************************************************
1210 ******************************************************************************/
....@@ -200,13 +198,13 @@
200198 if (!prev_seq) {
201199 kref_get(&lkb->lkb_ref);
202200
201
+ mutex_lock(&ls->ls_cb_mutex);
203202 if (test_bit(LSFL_CB_DELAY, &ls->ls_flags)) {
204
- mutex_lock(&ls->ls_cb_mutex);
205203 list_add(&lkb->lkb_cb_list, &ls->ls_cb_delay);
206
- mutex_unlock(&ls->ls_cb_mutex);
207204 } else {
208205 queue_work(ls->ls_callback_wq, &lkb->lkb_cb_work);
209206 }
207
+ mutex_unlock(&ls->ls_cb_mutex);
210208 }
211209 out:
212210 mutex_unlock(&lkb->lkb_cb_mutex);
....@@ -286,7 +284,9 @@
286284
287285 void dlm_callback_suspend(struct dlm_ls *ls)
288286 {
287
+ mutex_lock(&ls->ls_cb_mutex);
289288 set_bit(LSFL_CB_DELAY, &ls->ls_flags);
289
+ mutex_unlock(&ls->ls_cb_mutex);
290290
291291 if (ls->ls_callback_wq)
292292 flush_workqueue(ls->ls_callback_wq);