Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;