qemu/hw/9pfs
Christian Schoenebeck cdafeda357 9pfs: fix 'total_open_fd' decrementation
According to 'man 2 close' errors returned by close() should only be used
for either diagnostic purposes or for catching data loss due to a previous
write error, as an error result of close() usually indicates a deferred
error of a previous write operation.

Therefore not decrementing 'total_open_fd' on a close() error is wrong
and would yield in a higher open file descriptor count than actually the
case, leading to 9p server reclaiming open file descriptors too soon.

Based-on: <20250312152933.383967-7-groug@kaod.org>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <E1tvEyJ-004dMa-So@kylie.crudebyte.com>
2025-05-05 11:28:29 +02:00
..
9p-local.c 9pfs: Introduce futimens file op 2025-05-05 11:28:29 +02:00
9p-local.h 9pfs: local: open/opendir: don't follow symlinks 2017-02-28 11:21:15 +01:00
9p-posix-acl.c 9pfs: fix removing non-existent POSIX ACL xattr on macOS host 2022-05-01 14:07:03 +02:00
9p-synth.c 9pfs: Introduce futimens file op 2025-05-05 11:28:29 +02:00
9p-synth.h 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread 2022-02-17 16:57:58 +01:00
9p-util-darwin.c 9pfs: fix qemu_mknodat() to always return -1 on error on macOS host 2022-05-01 14:07:03 +02:00
9p-util-generic.c 9pfs: improve v9fs_open() tracing 2025-02-06 17:10:46 +01:00
9p-util-linux.c 9p: darwin: Implement compatibility for mknodat 2022-03-07 11:49:31 +01:00
9p-util.h 9pfs: Introduce futimens file op 2025-05-05 11:28:29 +02:00
9p-xattr-user.c trivial typos: namesapce 2022-06-28 11:06:44 +02:00
9p-xattr.c 9pfs: add link to 9p developer docs 2021-07-05 13:03:16 +02:00
9p-xattr.h 9pfs: fix XattrOperations typedef 2018-01-08 11:18:22 +01:00
9p.c 9pfs: fix 'total_open_fd' decrementation 2025-05-05 11:28:29 +02:00
9p.h 9pfs: fix concurrent v9fs_reclaim_fd() calls 2025-05-05 11:28:28 +02:00
codir.c 9pfs: fix 'total_open_fd' decrementation 2025-05-05 11:28:29 +02:00
cofile.c 9pfs: fix 'total_open_fd' decrementation 2025-05-05 11:28:29 +02:00
cofs.c 9pfs: Introduce futimens file op 2025-05-05 11:28:29 +02:00
coth.c thread-pool: avoid passing the pool parameter every time 2023-04-25 13:17:28 +02:00
coth.h 9pfs: Introduce futimens file op 2025-05-05 11:28:29 +02:00
coxattr.c coroutine: Clean up superfluous inclusion of qemu/coroutine.h 2023-01-19 10:18:28 +01:00
Kconfig hw/9pfs: Fix Kconfig dependency problem between 9pfs and Xen 2020-11-05 15:21:11 +01:00
meson.build 9pfs: improve v9fs_open() tracing 2025-02-06 17:10:46 +01:00
trace-events 9pfs: improve v9fs_open() tracing 2025-02-06 17:10:46 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
virtio-9p-device.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
virtio-9p.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
xen-9p-backend.c hw/xen: Make XenDevOps structures const 2024-06-04 11:53:43 +02:00
xen-9pfs.h xen: Import other xen/io/*.h 2019-06-24 10:42:30 +01:00