From 8474901a33d8a27958bfa99e78736863abd67874 Mon Sep 17 00:00:00 2001 From: Andrea Arcangeli Date: Wed, 22 Feb 2017 15:42:12 -0800 Subject: userfaultfd: convert BUG() to WARN_ON_ONCE() Avoid BUG_ON()s and only WARN instead. This is just a cleanup, it can't make any runtime difference. This BUG_ON has never triggered and cannot trigger. Link: http://lkml.kernel.org/r/20161216144821.5183-4-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Hillf Danton Cc: Michael Rapoport Cc: Mike Kravetz Cc: Mike Rapoport Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/userfaultfd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index cf1856cb25d2..71e917387ec3 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -574,7 +574,8 @@ static unsigned int userfaultfd_poll(struct file *file, poll_table *wait) ret = POLLIN; return ret; default: - BUG(); + WARN_ON_ONCE(1); + return POLLERR; } } -- cgit v1.2.3