freebsd-nq/tests/sys
Alan Somers 25927e068f fusefs: correctly handle an inode that changes file types
Correctly handle the situation where a FUSE server unlinks a file, then
creates a new file of a different type but with the same inode number.
Previously fuse_vnop_lookup in this situation would return EAGAIN.  But
since it didn't call vgone(), the vnode couldn't be reused right away.
Fix this by immediately calling vgone() and reallocating a new vnode.

This problem can occur in three code paths, during VOP_LOOKUP,
VOP_SETATTR, or following FUSE_GETATTR, which usually happens during
VOP_GETATTR but can occur during other vops, too.  Note that the correct
response actually doesn't depend on whether the entry cache has expired.
In fact, during VOP_LOOKUP, we can't even tell.  Either it has expired
already, or else the vnode got reclaimed by vnlru.

Also, correct the error code during the VOP_SETATTR path.

PR:		258022
Reported by:	chogata@moosefs.pro
MFC after:	2 weeks
Reviewed by:	pfg
Differential Revision: https://reviews.freebsd.org/D33283
2021-12-06 21:36:46 -07:00
..
acl tests/sys/acl: Add ATF C test for newly added acl_* functions. 2021-08-27 11:52:21 +03:00
aio Temporarily skip flaky tset cases under sys.aio.aio_test in CI 2021-09-29 03:32:47 +08:00
audit
auditpipe
capsicum Fix MK_TESTS build with MK_ASAN/MK_UBSAN 2021-08-02 14:33:24 +01:00
cddl
common tests/divert: fix after 2ce85919bb (IP source address validation) 2021-11-12 11:20:06 -08:00
devrandom
fifo
file vfs: Permit unix sockets to be opened with O_PATH 2021-09-17 14:19:06 -04:00
fs fusefs: correctly handle an inode that changes file types 2021-12-06 21:36:46 -07:00
geom gmultipath tests: Re-enable the failloop test in CI 2021-10-04 12:28:27 -04:00
kern Fix copyright to be like all my others in the tree 2021-11-23 21:21:18 -07:00
kqueue fifos: delegate unhandled kqueue filters to underlying filesystem 2021-10-12 02:43:07 -05:00
mac
mqueue
net net tests: fix if_stf:6to4 2021-11-20 19:29:02 +01:00
netgraph Remove riscv workaround in sys.netgraph.hub.loop test 2021-12-05 11:12:40 -04:00
netinet tests/divert: fix after 2ce85919bb (IP source address validation) 2021-11-12 11:20:06 -08:00
netinet6
netipsec
netmap
netpfil dummynet tests: disable for now 2021-12-06 18:15:24 +01:00
opencrypto ossl: Add support for AES-CBC cipher 2021-11-08 10:53:31 +01:00
pjdfstest
posixshm posixshmtest: Fix various warnings raised by GCC. 2021-09-15 09:03:18 -07:00
sys sys/bitset.h: reduce visibility of BIT_* macros 2021-12-05 23:00:25 +01:00
vfs
vm
vmm vmm: Add credential to cdev object 2021-08-18 13:41:33 -04:00
Makefile vmm: Add credential to cdev object 2021-08-18 13:41:33 -04:00
Makefile.depend
Makefile.inc