diff options
| author | 2018-05-08 08:58:49 +0000 | |
|---|---|---|
| committer | 2018-05-08 08:58:49 +0000 | |
| commit | 75078e107d279ae53a33413c23ac3bb403c0a56b (patch) | |
| tree | 05823d4e568588bd622f045c65b13eed4b2b031e /sys/kern/vfs_subr.c | |
| parent | Protect per-file counters and document which lock is used to protect (diff) | |
| download | wireguard-openbsd-75078e107d279ae53a33413c23ac3bb403c0a56b.tar.xz wireguard-openbsd-75078e107d279ae53a33413c23ac3bb403c0a56b.zip | |
Move the vfs stall "barrier" logic to a function. FREF() will soon
change and this has nothing to do with it.
ok visa@, bluhm@
Diffstat (limited to 'sys/kern/vfs_subr.c')
| -rw-r--r-- | sys/kern/vfs_subr.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index f600bcff117..149819a0664 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.270 2018/05/07 15:24:05 bluhm Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.271 2018/05/08 08:58:49 mpi Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -1627,6 +1627,13 @@ vfs_stall(struct proc *p, int stall) return (allerror); } +void +vfs_stall_barrier(void) +{ + rw_enter_read(&vfs_stall_lock); + rw_exit_read(&vfs_stall_lock); +} + /* * Unmount all file systems. * We traverse the list in reverse order under the assumption that doing so |
