freebsd-dev/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
..
amd64 amd64 ia32 vdso: add unwind annotations to the signal trampoline 2021-12-06 20:47:24 +02:00
arm omap4: Fix a few typos in source code comments 2021-12-04 12:13:27 +01:00
arm64 arm64, powerpc: fix calculation of 'used' in GET_STACK_USAGE 2021-11-30 11:15:44 -04:00
bsm
cam cam/iosched: fix off by one error 2021-12-05 23:00:01 -07:00
cddl Allow ddb and dtrace use the DMAP region on arm64 2021-10-01 11:27:33 +01:00
compat fcntl(2): add F_KINFO operation 2021-12-06 22:18:09 +02:00
conf amd64: Pass DEBUG when building VDSO wrapper 2021-12-07 00:24:20 +00:00
contrib zlib: Fix bootstrap build on macOS 2021-12-07 00:24:19 +00:00
crypto aesni: plug a set-but-not-unused var in aesni_newsession 2021-11-24 16:25:50 +00:00
ddb
dev ifnet_byindex() actually requires network epoch 2021-12-06 09:32:31 -08:00
dts add rk3328 overlay for enabling analog sound 2021-11-13 11:09:23 +02:00
fs fusefs: correctly handle an inode that changes file types 2021-12-06 21:36:46 -07:00
gdb
geom Fix "set but not used" for geom 2021-12-03 23:40:24 -07:00
gnu
i386 x86: Deduplicate clock.h 2021-12-06 10:39:08 -05:00
isa
kern fcntl(2): add F_KINFO operation 2021-12-06 22:18:09 +02:00
kgssapi
libkern
mips Implement GET_STACK_USAGE on remaining archs 2021-11-30 11:15:56 -04:00
modules amd64: Only build aout.ko when COMPAT_FREEBSD32 is enabled 2021-12-07 02:10:48 +02:00
net ifnet: make V_if_index static to if.c 2021-12-06 09:32:31 -08:00
net80211 net80211(4): Fix a typo in a sysctl description 2021-12-04 12:09:17 +01:00
netgraph ng_ubt: Avoid attaching to several newer Intel controllers 2021-12-05 10:51:46 -05:00
netinet ifnet_byindex() actually requires network epoch 2021-12-06 09:32:31 -08:00
netinet6 in6p_set_multicast_if(): fix malloc(M_WAITOK) with epoch 2021-12-06 14:33:23 -08:00
netipsec ipsec: fix a panic with INVARIANTS 2021-12-03 14:22:23 -09:00
netpfil pfsync: fix incorrect enabling of defer mode 2021-12-06 13:25:14 +01:00
netsmb
nfs kernel: partially revert e9efb1125a15, default inet mask 2021-11-14 14:12:25 -06:00
nfsclient
nfsserver
nlm
ofed socket: De-duplicate SBLOCKWAIT() definitions 2021-09-14 09:01:32 -04:00
opencrypto Fix "set but not used" in opencrypto, with a correction for the previous 2021-12-05 15:30:36 -07:00
powerpc arm64, powerpc: fix calculation of 'used' in GET_STACK_USAGE 2021-11-30 11:15:44 -04:00
riscv Implement GET_STACK_USAGE on remaining archs 2021-11-30 11:15:56 -04:00
rpc mbuf: Only allow extpg mbufs if the system has a direct map 2021-11-16 13:31:04 -05:00
security MAC/priority module for realtime privilege group 2021-12-04 20:19:25 +02:00
sys fcntl(2): add F_KINFO operation 2021-12-06 22:18:09 +02:00
teken
tests
tools amd64: Pass DEBUG when building VDSO wrapper 2021-12-07 00:24:20 +00:00
ufs Revert "ffs(3): Fix a typo in a sysctl description" 2021-12-05 13:45:47 +01:00
vm Set uninitialized popmap bits in vm_reserv_init 2021-12-05 17:17:25 -06:00
x86 x86: Perform late TSC calibration before LAPIC timer calibration 2021-12-06 10:42:19 -05:00
xdr
xen xen/privcmd: fix MMAP_RESOURCE ioctl to copy out results 2021-11-18 09:46:44 +01:00
Makefile