提交 d2ab0b0c 编写于 作者: J 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: NJ. Bruce Fields <bfields@citi.umich.edu>
上级 87250dd2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册