]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Holding a vnode doesn't prevent v_mount from disappearing (when the
authorSuleiman Souhlal <ssouhlal@FreeBSD.org>
Sat, 6 Aug 2005 01:42:04 +0000 (01:42 +0000)
committerSuleiman Souhlal <ssouhlal@FreeBSD.org>
Sat, 6 Aug 2005 01:42:04 +0000 (01:42 +0000)
commit34cc826ae8999f454dd6cb9c77d17ce83b169f92
tree2c62ba83632019391b20d5a85bd35d5065c6f434
parent1446d11a9b6d4387bccad67611ca94fd795605ba
Holding a vnode doesn't prevent v_mount from disappearing (when the
vnode is inactivated), possibly leading to a NULL dereference when
checking if the mount wants knotes to be activated in the VOP hooks.
So, we add a new vnode flag VV_NOKNOTE that is only set in getnewvnode(),
if necessary, and check it when activating knotes.
Since the flags are not erased when a vnode is being held, we can safely
read them.

Reviewed by: kris@
MFC after: 3 days
sys/kern/vfs_subr.c
sys/sys/mount.h
sys/sys/vnode.h