| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /****************************************************************************** |
|---|
| 2 | 3 | ******************************************************************************* |
|---|
| 3 | 4 | ** |
|---|
| 4 | 5 | ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
|---|
| 5 | 6 | ** Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. |
|---|
| 6 | 7 | ** |
|---|
| 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. |
|---|
| 10 | 8 | ** |
|---|
| 11 | 9 | ******************************************************************************* |
|---|
| 12 | 10 | ******************************************************************************/ |
|---|
| .. | .. |
|---|
| 200 | 198 | if (!prev_seq) { |
|---|
| 201 | 199 | kref_get(&lkb->lkb_ref); |
|---|
| 202 | 200 | |
|---|
| 201 | + mutex_lock(&ls->ls_cb_mutex); |
|---|
| 203 | 202 | if (test_bit(LSFL_CB_DELAY, &ls->ls_flags)) { |
|---|
| 204 | | - mutex_lock(&ls->ls_cb_mutex); |
|---|
| 205 | 203 | list_add(&lkb->lkb_cb_list, &ls->ls_cb_delay); |
|---|
| 206 | | - mutex_unlock(&ls->ls_cb_mutex); |
|---|
| 207 | 204 | } else { |
|---|
| 208 | 205 | queue_work(ls->ls_callback_wq, &lkb->lkb_cb_work); |
|---|
| 209 | 206 | } |
|---|
| 207 | + mutex_unlock(&ls->ls_cb_mutex); |
|---|
| 210 | 208 | } |
|---|
| 211 | 209 | out: |
|---|
| 212 | 210 | mutex_unlock(&lkb->lkb_cb_mutex); |
|---|
| .. | .. |
|---|
| 286 | 284 | |
|---|
| 287 | 285 | void dlm_callback_suspend(struct dlm_ls *ls) |
|---|
| 288 | 286 | { |
|---|
| 287 | + mutex_lock(&ls->ls_cb_mutex); |
|---|
| 289 | 288 | set_bit(LSFL_CB_DELAY, &ls->ls_flags); |
|---|
| 289 | + mutex_unlock(&ls->ls_cb_mutex); |
|---|
| 290 | 290 | |
|---|
| 291 | 291 | if (ls->ls_callback_wq) |
|---|
| 292 | 292 | flush_workqueue(ls->ls_callback_wq); |
|---|