summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/nfsclient/nfs_socket.c')
-rw-r--r--sys/nfsclient/nfs_socket.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c
index 6036050..039d0e1 100644
--- a/sys/nfsclient/nfs_socket.c
+++ b/sys/nfsclient/nfs_socket.c
@@ -1888,10 +1888,11 @@ nfs_down(rep, nmp, td, msg, error, flags)
} else
mtx_unlock(&nmp->nm_mtx);
#endif
- mtx_lock(&rep->r_mtx);
- if (rep)
+ if (rep != NULL) {
+ mtx_lock(&rep->r_mtx);
rep->r_flags |= R_TPRINTFMSG;
- mtx_unlock(&rep->r_mtx);
+ mtx_unlock(&rep->r_mtx);
+ }
nfs_msg(td, nmp->nm_mountp->mnt_stat.f_mntfromname, msg, error);
}
OpenPOWER on IntegriCloud