summaryrefslogtreecommitdiff
path: root/fs/dlm/user.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2022-11-17 17:11:42 -0500
committerDavid Teigland <teigland@redhat.com>2022-11-21 09:45:49 -0600
commit740bb8fc10d226d64c7da2271cf0b25dab1538dc (patch)
tree31c868a938e4b26ee8dbea6c013efb0e1732882b /fs/dlm/user.c
parent9267c85769e62c10961451fd28e88de996fdf401 (diff)
fs: dlm: ast do WARN_ON_ONCE() on hotpath
This patch changes the ast hotpath functionality in very unlikely cases that we do WARN_ON_ONCE() instead of WARN_ON() to not spamming the console output if we run into states that it would occur over and over again. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/user.c')
-rw-r--r--fs/dlm/user.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 6b530db4bc0b..edf722d6935a 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -214,7 +214,7 @@ void dlm_user_add_ast(struct dlm_lkb *lkb, uint32_t flags, int mode,
switch (rv) {
case DLM_ENQUEUE_CALLBACK_FAILURE:
spin_unlock(&proc->asts_spin);
- WARN_ON(1);
+ WARN_ON_ONCE(1);
goto out;
case DLM_ENQUEUE_CALLBACK_NEED_SCHED:
kref_get(&lkb->lkb_ref);
@@ -224,7 +224,7 @@ void dlm_user_add_ast(struct dlm_lkb *lkb, uint32_t flags, int mode,
case DLM_ENQUEUE_CALLBACK_SUCCESS:
break;
default:
- WARN_ON(1);
+ WARN_ON_ONCE(1);
break;
}
spin_unlock(&proc->asts_spin);
@@ -880,7 +880,7 @@ static ssize_t device_read(struct file *file, char __user *buf, size_t count,
spin_unlock(&proc->asts_spin);
/* removes ref for proc->asts, may cause lkb to be freed */
dlm_put_lkb(lkb);
- WARN_ON(1);
+ WARN_ON_ONCE(1);
goto try_another;
case DLM_DEQUEUE_CALLBACK_LAST:
list_del_init(&lkb->lkb_cb_list);
@@ -890,7 +890,7 @@ static ssize_t device_read(struct file *file, char __user *buf, size_t count,
case DLM_DEQUEUE_CALLBACK_SUCCESS:
break;
default:
- WARN_ON(1);
+ WARN_ON_ONCE(1);
break;
}
spin_unlock(&proc->asts_spin);