fs: dlm: LSFL_CB_DELAY only for kernel lockspaces
This patch only set/clear the LSFL_CB_DELAY bit when it's actually a kernel lockspace signaled by if ls->ls_callback_wq is set or not set in this case. User lockspaces will never evaluate this flag. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
12cda13cfd
commit
9cb16d4271
13
fs/dlm/ast.c
13
fs/dlm/ast.c
@ -288,12 +288,13 @@ void dlm_callback_stop(struct dlm_ls *ls)
|
|||||||
|
|
||||||
void dlm_callback_suspend(struct dlm_ls *ls)
|
void dlm_callback_suspend(struct dlm_ls *ls)
|
||||||
{
|
{
|
||||||
mutex_lock(&ls->ls_cb_mutex);
|
if (ls->ls_callback_wq) {
|
||||||
set_bit(LSFL_CB_DELAY, &ls->ls_flags);
|
mutex_lock(&ls->ls_cb_mutex);
|
||||||
mutex_unlock(&ls->ls_cb_mutex);
|
set_bit(LSFL_CB_DELAY, &ls->ls_flags);
|
||||||
|
mutex_unlock(&ls->ls_cb_mutex);
|
||||||
|
|
||||||
if (ls->ls_callback_wq)
|
|
||||||
flush_workqueue(ls->ls_callback_wq);
|
flush_workqueue(ls->ls_callback_wq);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAX_CB_QUEUE 25
|
#define MAX_CB_QUEUE 25
|
||||||
@ -304,11 +305,11 @@ void dlm_callback_resume(struct dlm_ls *ls)
|
|||||||
int count = 0, sum = 0;
|
int count = 0, sum = 0;
|
||||||
bool empty;
|
bool empty;
|
||||||
|
|
||||||
clear_bit(LSFL_CB_DELAY, &ls->ls_flags);
|
|
||||||
|
|
||||||
if (!ls->ls_callback_wq)
|
if (!ls->ls_callback_wq)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
clear_bit(LSFL_CB_DELAY, &ls->ls_flags);
|
||||||
|
|
||||||
more:
|
more:
|
||||||
mutex_lock(&ls->ls_cb_mutex);
|
mutex_lock(&ls->ls_cb_mutex);
|
||||||
list_for_each_entry_safe(lkb, safe, &ls->ls_cb_delay, lkb_cb_list) {
|
list_for_each_entry_safe(lkb, safe, &ls->ls_cb_delay, lkb_cb_list) {
|
||||||
|
Loading…
Reference in New Issue
Block a user