diff options
| author | Andrea Arcangeli <[email protected]> | 2017-02-22 15:42:12 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2017-02-22 16:41:28 -0800 |
| commit | 8474901a33d8a27958bfa99e78736863abd67874 (patch) | |
| tree | 9163a3aafeff6d7854ed7b567af7633eece19eea | |
| parent | a4605a61d642fe9b9de050d356432ecac82cc701 (diff) | |
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/[email protected]
Signed-off-by: Andrea Arcangeli <[email protected]>
Cc: "Dr. David Alan Gilbert" <[email protected]>
Cc: Hillf Danton <[email protected]>
Cc: Michael Rapoport <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| -rw-r--r-- | fs/userfaultfd.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } } |