summaryrefslogtreecommitdiff
path: root/net/unix/scm.c
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2024-01-29 11:04:33 -0800
committerJakub Kicinski <kuba@kernel.org>2024-01-31 16:41:15 -0800
commitd0f6dc26346863e1f4a23117f5468614e54df064 (patch)
tree6148f55236e9b2008a9f5d9dcddc833c52de3670 /net/unix/scm.c
parent2dc23b6f852bc7816d7ab421979d95223e894be3 (diff)
af_unix: Replace BUG_ON() with WARN_ON_ONCE().
This is a prep patch for the last patch in this series so that checkpatch will not warn about BUG_ON(). Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Acked-by: Jens Axboe <axboe@kernel.dk> Link: https://lore.kernel.org/r/20240129190435.57228-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/scm.c')
-rw-r--r--net/unix/scm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/unix/scm.c b/net/unix/scm.c
index b5ae5ab16777..505e56cf02a2 100644
--- a/net/unix/scm.c
+++ b/net/unix/scm.c
@@ -51,10 +51,10 @@ void unix_inflight(struct user_struct *user, struct file *fp)
if (u) {
if (!u->inflight) {
- BUG_ON(!list_empty(&u->link));
+ WARN_ON_ONCE(!list_empty(&u->link));
list_add_tail(&u->link, &gc_inflight_list);
} else {
- BUG_ON(list_empty(&u->link));
+ WARN_ON_ONCE(list_empty(&u->link));
}
u->inflight++;
/* Paired with READ_ONCE() in wait_for_unix_gc() */
@@ -71,8 +71,8 @@ void unix_notinflight(struct user_struct *user, struct file *fp)
spin_lock(&unix_gc_lock);
if (u) {
- BUG_ON(!u->inflight);
- BUG_ON(list_empty(&u->link));
+ WARN_ON_ONCE(!u->inflight);
+ WARN_ON_ONCE(list_empty(&u->link));
u->inflight--;
if (!u->inflight)