From 14d199ad29fd3be99249a8d786d9900441d3dcb1 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 16 Jul 2002 15:12:07 +0000 Subject: [PATCH] If we get a receive error in nfs_receive() and then get an error trying to obtain the send lock, we would bogusly try to unlock the send lock before returning resulting in a panic. Instead, only unlock the send lock if nfs_sndlock() succeeds and nfs_reconnect() fails. MFC after: 3 days Sponsored by: The Weather Channel --- sys/nfsclient/nfs_socket.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index 496cbe49ea3..64f677cf3fa 100644 --- a/sys/nfsclient/nfs_socket.c +++ b/sys/nfsclient/nfs_socket.c @@ -643,12 +643,13 @@ errout: error, rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname); error = nfs_sndlock(rep); - if (!error) + if (!error) { error = nfs_reconnect(rep); - if (!error) - goto tryagain; - else - nfs_sndunlock(rep); + if (!error) + goto tryagain; + else + nfs_sndunlock(rep); + } } } else { if ((so = rep->r_nmp->nm_so) == NULL)