From 22ecc18d193c16c9123b764b6c9c3f6920275057 Mon Sep 17 00:00:00 2001 From: alfred Date: Wed, 20 Nov 2002 10:06:51 +0000 Subject: comment and untwist error return logic --- sys/nfsclient/nfs_lock.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys') 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); } /* -- cgit v1.1