Skip to content

Commit

Permalink
locks: convert an -EINVAL return to a BUG
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
J. Bruce Fields committed Jul 18, 2007
1 parent 87250dd commit d2ab0b0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,9 +1348,7 @@ static int __setlease(struct file *filp, long arg, struct file_lock **flp)

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;

Expand Down

0 comments on commit d2ab0b0

Please sign in to comment.