diff options
author | jeff <jeff@FreeBSD.org> | 2002-09-25 02:28:07 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-09-25 02:28:07 +0000 |
commit | e314a37c452dd59bc7fdbb7f2bc6d92c8a9950cd (patch) | |
tree | 05e64f40964273666ffdb4a0e1b927602f39c197 /sys/fs/nullfs/null_vfsops.c | |
parent | ee7cd9172dd5eea53b5dbaba9e95161c06ddb2cc (diff) | |
download | FreeBSD-src-e314a37c452dd59bc7fdbb7f2bc6d92c8a9950cd.zip FreeBSD-src-e314a37c452dd59bc7fdbb7f2bc6d92c8a9950cd.tar.gz |
- Hold the vp lock while accessing v_vflags.
Diffstat (limited to 'sys/fs/nullfs/null_vfsops.c')
-rw-r--r-- | sys/fs/nullfs/null_vfsops.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index ec41e30..d6ca211 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -171,13 +171,10 @@ nullfs_mount(mp, ndp, td) */ error = null_nodeget(mp, lowerrootvp, &vp); /* - * Unlock the node (either the lower or the alias) - */ - VOP_UNLOCK(vp, 0, td); - /* * Make sure the node alias worked */ if (error) { + VOP_UNLOCK(vp, 0, td); vrele(lowerrootvp); free(xmp, M_NULLFSMNT); /* XXX */ return (error); @@ -187,10 +184,15 @@ nullfs_mount(mp, ndp, td) * Keep a held reference to the root vnode. * It is vrele'd in nullfs_unmount. */ - mp_fixme("Unlocked vflag access"); nullm_rootvp = vp; nullm_rootvp->v_vflag |= VV_ROOT; xmp->nullm_rootvp = nullm_rootvp; + + /* + * Unlock the node (either the lower or the alias) + */ + VOP_UNLOCK(vp, 0, td); + if (NULLVPTOLOWERVP(nullm_rootvp)->v_mount->mnt_flag & MNT_LOCAL) mp->mnt_flag |= MNT_LOCAL; mp->mnt_data = (qaddr_t) xmp; |