From nobody Fri Jun 12 23:50:45 2026 X-Original-To: dev-commits-src-all@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 4gcbqp1x2Fz6hLtB for ; Fri, 12 Jun 2026 23:50:46 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gcbqn6DFGz3c56 for ; Fri, 12 Jun 2026 23:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781308245; 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=Jy8IKlHy01DuEmGzzyvO0S4mTp/c/7Lz4QM4/vTiKSA=; b=x0zkagVSq3HLLFe7GMdr99+kRkuEfFKV55+Ys+Avi1yuDwfpRP5TqiuG1MPyJ/rWcqbO20 Wf7xJ2Jff2T4iZDtJyr8OzEy9Vq4Eh6uIFq5gu80LvfCwudI7On2ejtxIY23A4VdQ6ojG6 6E1ZTt6fiW06n99AIVQD4tYv1sEKtrJC8jI6VD2DP3N8umB+zSAsY4AEKTiC5qbu+DUjcG +DFOHY2wnCE+jLersCIaqlV+NqFjp0345Z/QsdBFY3niJkBFjFka3Po0PmYDCmPWJ0tohI +SEfEeeHONjGLO07zdvipTU0CIx3JQm5mF81xEo9UWMon6fWZozraxlJv1w8lg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781308245; a=rsa-sha256; cv=none; b=gHCO24cSEk8kNH2AOQBnNoxrnhabeNmEfBKPJB2GaWXWvTbzcrIyZvviC4x1iI3UbBBYi5 yMYxuWzS8M9SjCTVhipeK/a1dXJZrvcZoEhInGtz7zlkRtLqlEtPTHnVmzdyq7h6iT0Sd8 ncHdKqq67oUTbDwwv/pwDo0BJByTy0wHftPPT8I8eDh+6Q6yL24jcsxHgi0As4A2bn0zEq mmLsYqB3JBHrR0ZSrXwg87ysIw73jgONSVSwXvi8mJB2EHVN928cY9X3pwMcKII/OgIrc9 ni+9+gfOwHafx6Ct6JiwvOp0bwrHJ/+98a03UwVN16ShgBDykw0MSGM2WDj91Q== 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=1781308245; 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=Jy8IKlHy01DuEmGzzyvO0S4mTp/c/7Lz4QM4/vTiKSA=; b=g3O5o4CNJmsPVME5z29yy3ErkigcJI6AskB0MmsoqiwNOf9ngUZMzQZwX68J0pTpoiYuSF EuqhSp7UTwGqDVpJc+8pd9U70OrvKzFZLYTWQ9FYyDqvaMfDbSWdq0LTElJ6UDocuqkRTZ LDwIXyN8UPKM5WMpidOoE3urtAmzoEo+6dheK+x/Suv+6snGrA85LR3x1tAkz4E4JShhFO uh9H4RMpyd9AM8G1AgiLBhXJpi4tDvjdCnXPqh/1irbIEHe8O9g1MgUyPlFYCYnvgT9rXY pB7WSPI0bJR0kQHafI7Ox+A4gG46XT59ey7N/RWmFxW7AN69v4/D61ScNSTvTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gcbqn5d0fzyZx for ; Fri, 12 Jun 2026 23:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fa32 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Jun 2026 23:50:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: CismonX From: Alan Somers Subject: git: 4179f1d9deed - main - fusefs: only search for FREAD fufh in readdir List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 4179f1d9deed83977f159c8afea204293ef4c7d7 Auto-Submitted: auto-generated Date: Fri, 12 Jun 2026 23:50:45 +0000 Message-Id: <6a2c9b55.3fa32.453041b5@gitrepo.freebsd.org> The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=4179f1d9deed83977f159c8afea204293ef4c7d7 commit 4179f1d9deed83977f159c8afea204293ef4c7d7 Author: CismonX AuthorDate: 2025-06-20 09:41:46 +0000 Commit: Alan Somers CommitDate: 2026-06-12 23:48:50 +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 MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1729 --- 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 d1badd0700f8..242e023a38dd 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -266,16 +266,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) @@ -2063,7 +2053,7 @@ fuse_vnop_readdir(struct vop_readdir_args *ap) return (EXTERROR(EINVAL, "Buffer is too small")); 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 "