NetBSD/sys/compat/common
ad 42d0626726 PR kern/38141 lookup/vfs_busy acquire rwlock recursively
Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.

Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:

- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
  sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
  and is only ever write locked in dounmount(). A write hold can't be taken
  on this lock if the current LWP could hold a vnode lock.

- kmutex_t mnt_updating. This is taken by threads updating the mount, for
  example when going r/o -> r/w, and is only present to serialize updates.
  In order to take this lock, a read hold must first be taken on
  mnt_unmounting, and the two need to be held across the operation.

One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.
2008-05-06 18:43:44 +00:00
..
Makefile Remove compat code for posix_fadvise 2008-02-24 12:54:15 +00:00
Makefile.inc
compat_exec.c ANSIfy most of the function definitions in sys/compat (but not ndis). 2007-12-08 18:35:53 +00:00
compat_sigaltstack.h
compat_util.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
compat_util.h Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
gen_errno_tables.awk
kern_exit_43.c Convert all the system call entry points from: 2007-12-20 23:02:38 +00:00
kern_info_09.c Convert all the system call entry points from: 2007-12-20 23:02:38 +00:00
kern_info_43.c Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since 2008-04-24 18:39:20 +00:00
kern_ipc_10.c Convert all the system call entry points from: 2007-12-20 23:02:38 +00:00
kern_resource_43.c Convert all the system call entry points from: 2007-12-20 23:02:38 +00:00
kern_sig_13.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
kern_sig_43.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
kern_xxx_12.c Grab kernel_lock for cpu_reboot(). 2008-04-23 13:40:17 +00:00
sysv_ipc_14.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
sysv_msg_14.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
sysv_sem_14.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
sysv_shm_14.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
tty_43.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
uipc_syscalls_30.c Convert all the system call entry points from: 2007-12-20 23:02:38 +00:00
uipc_syscalls_40.c Use IFADDR_EMPTY(). 2007-12-05 22:51:01 +00:00
uipc_syscalls_43.c Remove now bogus assertion. 2008-04-29 19:02:14 +00:00
vfs_syscalls_12.c Catch up with descriptor handling changes. See kern_descrip.c revision 2008-03-21 21:54:58 +00:00
vfs_syscalls_20.c PR kern/38141 lookup/vfs_busy acquire rwlock recursively 2008-05-06 18:43:44 +00:00
vfs_syscalls_30.c Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
vfs_syscalls_43.c Catch up with descriptor handling changes. See kern_descrip.c revision 2008-03-21 21:54:58 +00:00
vm_12.c Convert all the system call entry points from: 2007-12-20 23:02:38 +00:00
vm_43.c Convert all the system call entry points from: 2007-12-20 23:02:38 +00:00