Commit d2ab0b0c authored by J. Bruce Fields's avatar J. Bruce Fields

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: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 87250dd2
...@@ -1348,9 +1348,7 @@ static int __setlease(struct file *filp, long arg, struct file_lock **flp) ...@@ -1348,9 +1348,7 @@ static int __setlease(struct file *filp, long arg, struct file_lock **flp)
time_out_leases(inode); time_out_leases(inode);
error = -EINVAL; BUG_ON(!(*flp)->fl_lmops->fl_break);
if (!flp || !(*flp) || !(*flp)->fl_lmops || !(*flp)->fl_lmops->fl_break)
goto out;
lease = *flp; lease = *flp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment