diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2007-06-30 12:40:32 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2007-07-18 19:09:27 -0400 |
commit | d2ab0b0c4c2570921a9ec1eff1e3a5143e05b231 (patch) | |
tree | 3ca5586f765066acae9e2c20eb5578ce3220e4e8 | |
parent | 87250dd26a34c65ae31d08837174222889007641 (diff) | |
download | op-kernel-dev-d2ab0b0c4c2570921a9ec1eff1e3a5143e05b231.zip op-kernel-dev-d2ab0b0c4c2570921a9ec1eff1e3a5143e05b231.tar.gz |
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>
-rw-r--r-- | fs/locks.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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; |