summaryrefslogtreecommitdiffstats
path: root/sys/sys/mount.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-09-11 13:06:06 +0000
committerkib <kib@FreeBSD.org>2010-09-11 13:06:06 +0000
commit107ea66c07f4e9862fd2961da07c078eab84d05f (patch)
treefd0a7ea41044fca75b3c668faa23382cf15de3fb /sys/sys/mount.h
parentfe4368ea53d115c6ccdebffbc023513a6424ec3a (diff)
downloadFreeBSD-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.h1
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 *);
OpenPOWER on IntegriCloud