summaryrefslogtreecommitdiffstats
path: root/fs/dlm/ast.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/ast.c
parent9267c85769e62c10961451fd28e88de996fdf401 (diff)
downloadlinux-740bb8fc10d226d64c7da2271cf0b25dab1538dc.tar.gz
linux-740bb8fc10d226d64c7da2271cf0b25dab1538dc.tar.bz2
linux-740bb8fc10d226d64c7da2271cf0b25dab1538dc.zip
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/ast.c')
-rw-r--r--fs/dlm/ast.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c
index 982d093b80cd..7dd072b8ea38 100644
--- a/fs/dlm/ast.c
+++ b/fs/dlm/ast.c
@@ -161,12 +161,12 @@ void dlm_add_cb(struct dlm_lkb *lkb, uint32_t flags, int mode, int status,
spin_unlock(&ls->ls_cb_lock);
break;
case DLM_ENQUEUE_CALLBACK_FAILURE:
- WARN_ON(1);
+ WARN_ON_ONCE(1);
break;
case DLM_ENQUEUE_CALLBACK_SUCCESS:
break;
default:
- WARN_ON(1);
+ WARN_ON_ONCE(1);
break;
}
spin_unlock(&lkb->lkb_cb_lock);
@@ -185,7 +185,7 @@ void dlm_callback_work(struct work_struct *work)
rv = dlm_dequeue_lkb_callback(lkb, &cb);
spin_unlock(&lkb->lkb_cb_lock);
- if (WARN_ON(rv == DLM_DEQUEUE_CALLBACK_EMPTY))
+ if (WARN_ON_ONCE(rv == DLM_DEQUEUE_CALLBACK_EMPTY))
goto out;
for (;;) {