diff options
author | pjd <pjd@FreeBSD.org> | 2007-04-17 21:16:34 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-04-17 21:16:34 +0000 |
commit | 8f71c77931da0cd478815a9680ed4e209095c39e (patch) | |
tree | a755bd1dd7cb7cddff129e7c66c7f38c4dda6ee5 /sys/cddl/compat/opensolaris/kern | |
parent | 4d856175c4226d86311a40254cd7b0b00f81a6fb (diff) | |
download | FreeBSD-src-8f71c77931da0cd478815a9680ed4e209095c39e.zip FreeBSD-src-8f71c77931da0cd478815a9680ed4e209095c39e.tar.gz |
- Fix a leftover - vfs_mount_alloc() is now exported properly.
This fixes stange panics when listing .zfs/snapshot/ directory for me.
Reported by: simokawa
Reported by: Johan Hendriks <Johan@double-l.nl>
- Hide cache_purge() under FREEBSD_NAMECACHE like in other files.
- Protect mnt_flag with mount interlock.
Diffstat (limited to 'sys/cddl/compat/opensolaris/kern')
-rw-r--r-- | sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c b/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c index 074a24b..ee30e3b 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c @@ -153,9 +153,6 @@ traverse(vnode_t **cvpp) return (error); } -extern struct mount *vfs_mount_alloc(struct vnode *vp, struct vfsconf *vfsp, - const char *fspath, struct thread *td); - int domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath, char *fspec, int fsflags) @@ -205,10 +202,12 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath, /* * Set the mount level flags. */ + MNT_ILOCK(mp); if (fsflags & MNT_RDONLY) mp->mnt_flag |= MNT_RDONLY; mp->mnt_flag &=~ MNT_UPDATEMASK; mp->mnt_flag |= fsflags & (MNT_UPDATEMASK | MNT_FORCE | MNT_ROOTFS); + MNT_IUNLOCK(mp); /* * Mount the filesystem. * XXX The final recipients of VFS_MOUNT just overwrite the ndp they @@ -231,7 +230,9 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath, /* * Put the new filesystem on the mount list after root. */ -// cache_purge(vp); +#ifdef FREEBSD_NAMECACHE + cache_purge(vp); +#endif if (!error) { vnode_t *mvp; |