kernel - Fix improper mplock in mount path
commit87f62b1cf14df14e016ca1f89e47e8573d4bb99a
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 8 Jan 2017 08:33:11 +0000 (8 00:33 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 8 Jan 2017 08:33:11 +0000 (8 00:33 -0800)
treeac562625c51b6c52d0c4daea9204b5e505065792
parent6422eba42a1e6dcaa450be548207c7f7cdb9f776
kernel - Fix improper mplock in mount path

* VFS_MOUNT() was being called before MNTK_ALL_MPSAFE could be set by
  the filesystem, causing the operation to run with the MP token held.

* Add VFCF_MPSAFE to the vfsconf flags and specify it for MPSAFE filesystems
  in their VFS_SET() specification.  This flag causes MNTK_ALL_MPSAFE to
  be set in mount->mnt_kern_flags prior to the VFS_MOUNT() call.  Set this
  flag for devfs, procfs, tmpfs, nullfs, hammer, and hammer2.

* Primarily effects synth or other bulk-builds which do a lot of mounting.
sys/kern/vfs_syscalls.c
sys/kern/vfs_vfsops.c
sys/sys/mount.h
sys/vfs/devfs/devfs_vfsops.c
sys/vfs/hammer/hammer_vfsops.c
sys/vfs/hammer2/hammer2_vfsops.c
sys/vfs/nfs/nfs_vfsops.c
sys/vfs/nullfs/null_vfsops.c
sys/vfs/procfs/procfs_vfsops.c
sys/vfs/tmpfs/tmpfs_vfsops.c