Changeset View
Changeset View
Standalone View
Standalone View
head/sys/fs/nullfs/null_vfsops.c
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
static int | static int | ||||
nullfs_mount(struct mount *mp) | nullfs_mount(struct mount *mp) | ||||
{ | { | ||||
int error = 0; | int error = 0; | ||||
struct vnode *lowerrootvp, *vp; | struct vnode *lowerrootvp, *vp; | ||||
struct vnode *nullm_rootvp; | struct vnode *nullm_rootvp; | ||||
struct null_mount *xmp; | struct null_mount *xmp; | ||||
struct thread *td = curthread; | |||||
char *target; | char *target; | ||||
int isvnunlocked = 0, len; | int isvnunlocked = 0, len; | ||||
struct nameidata nd, *ndp = &nd; | struct nameidata nd, *ndp = &nd; | ||||
NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp); | NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp); | ||||
if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_NULLFS)) | |||||
return (EPERM); | |||||
if (mp->mnt_flag & MNT_ROOTFS) | if (mp->mnt_flag & MNT_ROOTFS) | ||||
return (EOPNOTSUPP); | return (EOPNOTSUPP); | ||||
/* | /* | ||||
* Update is a no-op | * Update is a no-op | ||||
*/ | */ | ||||
if (mp->mnt_flag & MNT_UPDATE) { | if (mp->mnt_flag & MNT_UPDATE) { | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 367 Lines • Show Last 20 Lines |