freebsd-dev/sys/fs
Konstantin Belousov 6470c8d3db Rework v_object lifecycle for vnodes.
Current implementation of vnode_create_vobject() and
vnode_destroy_vobject() is written so that it prepared to handle the
vm object destruction for live vnode.  Practically, no filesystems use
this, except for some remnants that were present in UFS till today.
One of the consequences of that model is that each filesystem must
call vnode_destroy_vobject() in VOP_RECLAIM() or earlier, as result
all of them get rid of the v_object in reclaim.

Move the call to vnode_destroy_vobject() to vgonel() before
VOP_RECLAIM().  This makes v_object stable: either the object is NULL,
or it is valid vm object till the vnode reclamation.  Remove code from
vnode_create_vobject() to handle races with the parallel destruction.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D21412
2019-08-29 07:50:25 +00:00
..
autofs Ensure that directory entry padding bytes are zeroed. 2018-11-23 22:24:59 +00:00
cd9660 Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
cuse Free all allocated unit IDs in cuse(3) after the client character 2019-06-25 11:46:01 +00:00
deadfs Switch to use shared vnode locks for text files during image activation. 2019-05-05 11:20:43 +00:00
devfs Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
ext2fs Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
fdescfs Ensure that directory entry padding bytes are zeroed. 2018-11-23 22:24:59 +00:00
fifofs fcntl: fix overflow when setting F_READAHEAD 2019-06-20 23:07:20 +00:00
fuse Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
msdosfs Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
nfs Add #ifdef INET as requested by bz@. 2019-04-21 22:53:51 +00:00
nfsclient Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
nfsserver Add support for the ModeSetMasked attribute to the NFSv4.1 server. 2019-04-19 23:35:08 +00:00
nullfs vfs: add VOP_NEED_INACTIVE 2019-08-28 20:34:24 +00:00
procfs Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
pseudofs pseudofs: Ignore unsupported commands in vop_setattr. 2019-05-28 20:54:59 +00:00
smbfs Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
tmpfs Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
udf Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
unionfs vfs: add VOP_NEED_INACTIVE 2019-08-28 20:34:24 +00:00