diff options
author | alfred <alfred@FreeBSD.org> | 2002-11-20 10:06:51 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-11-20 10:06:51 +0000 |
commit | 22ecc18d193c16c9123b764b6c9c3f6920275057 (patch) | |
tree | 8a9b337fed83a8436400379b8d541ccab4223fb0 | |
parent | f4e72b4767a4024a79cdf2be4b5926594ee9324b (diff) | |
download | FreeBSD-src-22ecc18d193c16c9123b764b6c9c3f6920275057.zip FreeBSD-src-22ecc18d193c16c9123b764b6c9c3f6920275057.tar.gz |
comment and untwist error return logic
-rw-r--r-- | sys/nfsclient/nfs_lock.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/nfsclient/nfs_lock.c b/sys/nfsclient/nfs_lock.c index 264284f..593532d 100644 --- a/sys/nfsclient/nfs_lock.c +++ b/sys/nfsclient/nfs_lock.c @@ -213,10 +213,9 @@ nfs_dolock(struct vop_advlock_args *ap) break; } - if ((error1 = vn_close(wvp, FWRITE, thread0.td_ucred, td)) && error == 0) - return (error1); - - return (error); + error1 = vn_close(wvp, FWRITE, thread0.td_ucred, td); + /* prefer any previous 'error' to our vn_close 'error1'. */ + return (error != 0 ? error : error1); } /* |