diff options
Diffstat (limited to 'sys/nfsclient/nfs_vfsops.c')
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 17536491..c21b48e 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -506,11 +506,13 @@ nfs_mountroot(struct mount *mp, struct thread *td) * set hostname here and then let the "/etc/rc.xxx" files * mount the right /var based upon its preset value. */ + mtx_lock(&hostname_mtx); bcopy(nd->my_hostnam, hostname, MAXHOSTNAMELEN); hostname[MAXHOSTNAMELEN - 1] = '\0'; for (i = 0; i < MAXHOSTNAMELEN; i++) if (hostname[i] == '\0') break; + mtx_unlock(&hostname_mtx); inittodr(ntohl(nd->root_time)); return (0); } |