diff options
-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); } /* |