diff options
Diffstat (limited to 'usr/src/uts/common/fs/vfs.c')
| -rw-r--r-- | usr/src/uts/common/fs/vfs.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/usr/src/uts/common/fs/vfs.c b/usr/src/uts/common/fs/vfs.c index 80289b61b0..61f43e6b00 100644 --- a/usr/src/uts/common/fs/vfs.c +++ b/usr/src/uts/common/fs/vfs.c @@ -21,7 +21,7 @@ /* * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2014, Joyent, Inc. All rights reserved. + * Copyright 2016 Joyent, Inc. * Copyright 2016 Toomas Soome <tsoome@me.com> * Copyright (c) 2016 by Delphix. All rights reserved. * Copyright 2016 Nexenta Systems, Inc. @@ -240,10 +240,13 @@ fsop_root(vfs_t *vfsp, vnode_t **vpp) * Make sure this root has a path. With lofs, it is possible to have * a NULL mountpoint. */ - if (ret == 0 && vfsp->vfs_mntpt != NULL && (*vpp)->v_path == NULL) { + if (ret == 0 && vfsp->vfs_mntpt != NULL && + (*vpp)->v_path == vn_vpath_empty) { + const char *path; + mntpt = vfs_getmntpoint(vfsp); - vn_setpath_str(*vpp, refstr_value(mntpt), - strlen(refstr_value(mntpt))); + path = refstr_value(mntpt); + vn_setpath_str(*vpp, path, strlen(path)); refstr_rele(mntpt); } @@ -853,9 +856,11 @@ vfs_mountroot(void) for (p = practive; p != NULL; p = p->p_next) { ASSERT(p == &p0 || p->p_parent == &p0); + mutex_enter(&p->p_lock); PTOU(p)->u_cdir = rootdir; VN_HOLD(PTOU(p)->u_cdir); PTOU(p)->u_rdir = NULL; + mutex_exit(&p->p_lock); } mutex_exit(&pidlock); @@ -3880,6 +3885,8 @@ vfs_to_modname(const char *vfstype) vfstype = "fdfs"; } else if (strncmp(vfstype, "nfs", 3) == 0) { vfstype = "nfs"; + } else if (strcmp(vfstype, "lxproc") == 0) { + vfstype = "lxprocfs"; } return (vfstype); |
