dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
J. Bruce Fields 2007-06-30 12:40:32 -04:00
parent 87250dd26a
commit d2ab0b0c4c
1 changed files with 1 additions and 3 deletions

View File

@ -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;