locks: convert an -EINVAL return to a BUG
There's no point trying to return an error in these cases, which all represent
bugs in the callers.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
diff --git a/fs/locks.c b/fs/locks.c
index 924e4a7..3c23fd2 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1348,9 +1348,7 @@
time_out_leases(inode);
- error = -EINVAL;
- if (!flp || !(*flp) || !(*flp)->fl_lmops || !(*flp)->fl_lmops->fl_break)
- goto out;
+ BUG_ON(!(*flp)->fl_lmops->fl_break);
lease = *flp;