Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d2ab0b0c4c2570921a9ec1eff1e3a5143e05b231 Commit: d2ab0b0c4c2570921a9ec1eff1e3a5143e05b231 Parent: 87250dd26a34c65ae31d08837174222889007641 Author: J. Bruce Fields <[EMAIL PROTECTED]> AuthorDate: Sat Jun 30 12:40:32 2007 -0400 Committer: J. Bruce Fields <[EMAIL PROTECTED]> CommitDate: Wed Jul 18 19:09:27 2007 -0400
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 <[EMAIL PROTECTED]> --- fs/locks.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/fs/locks.c b/fs/locks.c index 924e4a7..3c23fd2 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -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; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html