From nobody Wed Aug 5 03:19:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hFFys0f1Qz6JTbK for ; Wed, 05 Aug 2026 03:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hFFys02mbz3J9K for ; Wed, 05 Aug 2026 03:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785900005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y42F8t5yHAcxx0jdvm6W81WaBAnuvotaxcA4JkeRYP8=; b=R5caBeGYnJFHGibJjAXhO1iZDPsg+V12u1r1HJUg2INjhMEe/JKvOKg/0O4Lb1KKx2UVfL h+o7OYhfzYvv6Gd7yTJZQ0+uiPhO9B0orU0E4U7zj7EJPIGahZhVT9leocXKUe+z7jS2yA ryd8CiWigVfBWLu1wr6JXbFAJsu8ayTakd/VrUFBM5kCUp8lcXR1T52tjeGO1O+Q6VJBca p5vPm8SayTo2+AvhOdlcXuxdCHAuuD+j1BRe/+Z+ct1BOpeC48RDJHnF9/xRPPeQk48R9l ZxAS+DnmjWO+5yhl21fapjYykEahuZoybAJFiGvnbnL9rtLZwEi4dyTocTi6qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785900005; a=rsa-sha256; cv=none; b=d8jCPzSJTyJuxsnaqekIH0Y7XluK73UqZpergNxjz14JqMWuy4SkrwWymZtNP/5IDMXU9M Mr3Y/YSI1u33wU6RaNB48cQHnNwr2p+Sa1MIxAmxWiI2154KB92ugb0PC07cYZ0/X9f1Bp ZQ1hWpt8eaN3x5yA7hQmmYmi7IpiICkRyPtDkJpHFxVBJButgIJfpAKSUI2VJfnvLJdqhr 27LFL901x0ZIFM+VUobFrRnM29U114FWFMCkXhQcKCtJ8H6JxcMBKDXV8Qv2/fnAOxZRLH EurVxuOQwQM3eoqlHzun9KEsKV666Jq7JnRdyyDl9iOd031Ce2mGdYfEQrL8PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785900005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y42F8t5yHAcxx0jdvm6W81WaBAnuvotaxcA4JkeRYP8=; b=tNBz452txwPFglFQz6t1Vb3rAfI380D0Hzdjww1poh6JAVBb9V7rffeYzwbjnVZUk+gKUd Omx4TfI6pNgXFTOEMfcRXX2Q7KsHK6w1JEwoOJtJ6kTxFPbe1UnzHsiaEZDjv4/Dhc5VQp Rx0z8nHhHO+sfNcdBGIxNpaCCCvHCQsIxiWkLrwH6+j+lqmxcdLIX5J/nL/Udhg8KG1yz5 R9V4zMLn5ZBVNa1dy1A4dUnZKAC2fVbUzRpe4BrVobJ1rCw8zkrH3vbGs9C0IgoU6p9BO4 q2mF9NFeP23OvPXDMbb6nFkubgN4lBB6LIJwh9emG11RHb/am5gpqhvumT7pSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hFFyr5sjJz1FN for ; Wed, 05 Aug 2026 03:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f678 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 05 Aug 2026 03:19:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: CismonX From: Alan Somers Subject: git: c77cb022906d - stable/14 - fusefs: only search for FREAD fufh in readdir List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c77cb022906de74fe69b218638b8776c1095b573 Auto-Submitted: auto-generated Date: Wed, 05 Aug 2026 03:19:59 +0000 Message-Id: <6a72abdf.3f678.796d8bc4@gitrepo.freebsd.org> The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=c77cb022906de74fe69b218638b8776c1095b573 commit c77cb022906de74fe69b218638b8776c1095b573 Author: CismonX AuthorDate: 2025-06-20 09:41:46 +0000 Commit: Alan Somers CommitDate: 2026-08-05 02:36:08 +0000 fusefs: only search for FREAD fufh in readdir The extra search for an FEXEC fufh shall be removed, since readdir is only supposed to be called on a directory opened with FREAD. The sole exception is NFS, which will call VOP_READDIR with directories that aren't open at all. fuse already has special code to handle that. Also remove the fuse_filehandle_get_dir() function, since it's not used anywhere else. Signed-off-by: CismonX Reviewed by: asomers Pull Request: https://github.com/freebsd/freebsd-src/pull/1729 (cherry picked from commit 4179f1d9deed83977f159c8afea204293ef4c7d7) --- sys/fs/fuse/fuse_vnops.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index ad246049949d..5ebdc17048a0 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -262,16 +262,6 @@ fuse_extattr_check_cred(struct vnode *vp, int ns, struct ucred *cred, } } -/* Get a filehandle for a directory */ -static int -fuse_filehandle_get_dir(struct vnode *vp, struct fuse_filehandle **fufhp, - struct ucred *cred, pid_t pid) -{ - if (fuse_filehandle_get(vp, FREAD, fufhp, cred, pid) == 0) - return 0; - return fuse_filehandle_get(vp, FEXEC, fufhp, cred, pid); -} - /* Send FUSE_FLUSH for this vnode */ static int fuse_flush(struct vnode *vp, struct ucred *cred, pid_t pid, int fflag) @@ -1940,7 +1930,7 @@ fuse_vnop_readdir(struct vop_readdir_args *ap) return EINVAL; tresid = uio->uio_resid; - err = fuse_filehandle_get_dir(vp, &fufh, cred, pid); + err = fuse_filehandle_get(vp, FREAD, &fufh, cred, pid); if (err == EBADF && mp->mnt_flag & MNT_EXPORTED) { KASSERT(!fsess_is_impl(mp, FUSE_OPENDIR), ("FUSE file systems that implement "