git: kernel - Fix improper mplock in mount path

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Jan 8 00:42:09 PST 2017


commit 87f62b1cf14df14e016ca1f89e47e8573d4bb99a
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Jan 8 00:33:11 2017 -0800

    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.

Summary of changes:
 sys/kern/vfs_syscalls.c          | 9 +++++++++
 sys/kern/vfs_vfsops.c            | 4 ----
 sys/sys/mount.h                  | 7 +++++++
 sys/vfs/devfs/devfs_vfsops.c     | 2 +-
 sys/vfs/hammer/hammer_vfsops.c   | 2 +-
 sys/vfs/hammer2/hammer2_vfsops.c | 2 +-
 sys/vfs/nfs/nfs_vfsops.c         | 2 +-
 sys/vfs/nullfs/null_vfsops.c     | 2 +-
 sys/vfs/procfs/procfs_vfsops.c   | 2 +-
 sys/vfs/tmpfs/tmpfs_vfsops.c     | 2 +-
 10 files changed, 23 insertions(+), 11 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/87f62b1cf14df14e016ca1f89e47e8573d4bb99a


-- 
DragonFly BSD source repository



More information about the Commits mailing list