summaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2024-03-28 16:48:39 +0100
committerDavid Teigland <teigland@redhat.com>2024-04-01 20:31:12 +0200
commit4ed424280942f40b033d669eb9204a52e6d41639 (patch)
tree2cf44bdb046667ada06fd93bcb76acf6c25a4dc9 /fs/dlm
parentdlm: remove callback queue debugfs functionality (diff)
downloadlinux-4ed424280942f40b033d669eb9204a52e6d41639.tar.xz
linux-4ed424280942f40b033d669eb9204a52e6d41639.zip
dlm: save callback debug info earlier
Save lkb callback info when queueing the callback so that the lkb struct is not needed in the callback workqueue processing. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/ast.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c
index dd7cca3c1472..cadbcbe0786b 100644
--- a/fs/dlm/ast.c
+++ b/fs/dlm/ast.c
@@ -105,8 +105,13 @@ int dlm_enqueue_lkb_callback(struct dlm_lkb *lkb, uint32_t flags, int mode,
list_add_tail(&cb->list, &lkb->lkb_callbacks);
- if (flags & DLM_CB_CAST)
+ if (flags & DLM_CB_BAST) {
+ lkb->lkb_last_bast_time = ktime_get();
+ lkb->lkb_last_bast_mode = cb->mode;
+ } else if (flags & DLM_CB_CAST) {
dlm_callback_set_last_ptr(&lkb->lkb_last_cast, cb);
+ lkb->lkb_last_cast_time = ktime_get();
+ }
dlm_callback_set_last_ptr(&lkb->lkb_last_cb, cb);
@@ -194,8 +199,6 @@ void dlm_callback_work(struct work_struct *work)
trace_dlm_bast(ls->ls_global_id, lkb->lkb_id,
cb->mode, rsb->res_name,
rsb->res_length);
- lkb->lkb_last_bast_time = ktime_get();
- lkb->lkb_last_bast_mode = cb->mode;
bastfn(lkb->lkb_astparam, cb->mode);
} else if (cb->flags & DLM_CB_CAST) {
lkb->lkb_lksb->sb_status = cb->sb_status;
@@ -203,7 +206,6 @@ void dlm_callback_work(struct work_struct *work)
trace_dlm_ast(ls->ls_global_id, lkb->lkb_id,
cb->sb_flags, cb->sb_status,
rsb->res_name, rsb->res_length);
- lkb->lkb_last_cast_time = ktime_get();
castfn(lkb->lkb_astparam);
}