diff options
author | kib <kib@FreeBSD.org> | 2010-09-11 13:06:06 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-09-11 13:06:06 +0000 |
commit | 107ea66c07f4e9862fd2961da07c078eab84d05f (patch) | |
tree | fd0a7ea41044fca75b3c668faa23382cf15de3fb /sys/sys/mount.h | |
parent | fe4368ea53d115c6ccdebffbc023513a6424ec3a (diff) | |
download | FreeBSD-src-107ea66c07f4e9862fd2961da07c078eab84d05f.zip FreeBSD-src-107ea66c07f4e9862fd2961da07c078eab84d05f.tar.gz |
Protect mnt_syncer with the sync_mtx. This prevents a (rare) vnode leak
when mount and update are executed in parallel.
Encapsulate syncer vnode deallocation into the helper function
vfs_deallocate_syncvnode(), to not externalize sync_mtx from vfs_subr.c.
Found and reviewed by: jh (previous version of the patch)
Tested by: pho
MFC after: 3 weeks
Diffstat (limited to 'sys/sys/mount.h')
-rw-r--r-- | sys/sys/mount.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 85f16ff..f68e95d 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -731,6 +731,7 @@ int vfs_busy(struct mount *, int); int vfs_export /* process mount export info */ (struct mount *, struct export_args *); void vfs_allocate_syncvnode(struct mount *); +void vfs_deallocate_syncvnode(struct mount *); int vfs_donmount(struct thread *td, int fsflags, struct uio *fsoptions); void vfs_getnewfsid(struct mount *); struct cdev *vfs_getrootfsid(struct mount *); |