From fbecfc4aa028964f972a0457809aa041d415f61b Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sun, 3 May 2026 22:09:15 +0300 Subject: [PATCH] fdescfs: do not change vnode type on VOP_GETATTR() There is no point to do it. The VNON type is good enough for fdescfs operations, and changing the type on stat(2) is arbitrary and does not serve much purpose, because we recalculate the returned file type on each stat(2) anyway. But setting the type to VLNK has undesired consequence of namei() trying VOP_READLINK() there, which might fail since it defer the calculation of path to vn_fullpath(). Submitted by: Mike PR: 294768 MFC after: 2 weeks --- sys/fs/fdescfs/fdesc_vnops.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index c1188c3819e..267e80918d1 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -469,7 +469,6 @@ fdesc_getattr(struct vop_getattr_args *ap) break; } - vp->v_type = vap->va_type; return (0); }