mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 00:34:10 +08:00
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:
parent
87250dd26a
commit
d2ab0b0c4c
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user