From nobody Thu Jan 12 18:26:49 2023 X-Original-To: dev-commits-src-main@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 4NtCgY3xWGz2pKx3; Thu, 12 Jan 2023 18:26:49 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NtCgY3RwPz4FWf; Thu, 12 Jan 2023 18:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673548009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6IzeeIyYT8vtZDgiV+ukxvdxW4YUUJ6JXFwm43D9CI4=; b=yAnFHzAm9a/YNUxUafjy0uA5zxzOt2JzVq0iXMLsh43XPebYgSJx4tYvNRk+1QHysfytah o8CpvPJSkq5hfKK6J/HuBhh6dAztsHRNKubEN0U4eC3TbBTGM+z4sRFAcFs6lbsmTA6UdH 6j0E6SPApPjSoohlCxtZGJZD7O9CQyLVeZ6Bw/UIITGIQ4EUjaCtZ34m46azdYwVOSUbnt oFSsWgrnnqIZ/OA/URisM64H2+XQgRGYTmHa/TWw8b2e2zfpLEkzjP1gpc9JwdeR/OINZ7 +XsQlpY6niTUCFxnNO00LUGzUU1TAFqQhgX3CIMX+5DLMoRFSKGqUpddQMNlAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673548009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6IzeeIyYT8vtZDgiV+ukxvdxW4YUUJ6JXFwm43D9CI4=; b=lBTFfm7Ozv277QC04BcZ4lTq2xueqsyYW4WcfhX4RYqQf9odtu4v0KIvPzDQiFABumKVvg bLshnOxmF33CfOa60MtRcyPQ2QBJsFvuKZ+vitUS7rPILBnGIOiWbUIui/Aj+DDPayOgwZ qR/siBCy03X/xRc0FPF+5HztPaOpYeBGYFy3J5U2HeXiMvs7Faa4RgdXzB3YniprxyS8je 5LNwUVsYOlP50bg7v32B36w6Icon2x5hkOl/+ESj+fMuiqtcAGFlTSuCmHt63LzH3MX1Vr bK5y3XSXO2hGTAdUT0Rryn4fWBHA2raaChUPmxnL/XMcvI2iwL645c1PmNSc7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673548009; a=rsa-sha256; cv=none; b=M/FcSsrgicJpzGREHqk4m6i0segVkSxjhTGU5/OpVABqZ578K3PKizynQIrZ88rLS1TE0+ 2Dzj+uJj/Td86TuM2NVaus+tusSQE7RKFWJZMetpzJXj2gcMbcH48Vr7V76iK1SP5hDaOa +TvRrKggm4I6hmww04OhSxLXx24u8/f5pu2jLZiq/kH+gXynDT1EmiCTdatYTu2zgV1QXF f9+1xHfqEHpZxS/l9sHSaPak9z6H07Nys0mYS1DZStcgD63aHc+bvzNBgIQa2z/zBo6BjP DOAQs9silbT0Dqm6cBJC429Q7ErmWywe+zBfuaJn4cyIGiOMFXtFxgqpiXPPFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NtCgY2P0DzcrN; Thu, 12 Jan 2023 18:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30CIQnpP021175; Thu, 12 Jan 2023 18:26:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30CIQnmG021174; Thu, 12 Jan 2023 18:26:49 GMT (envelope-from git) Date: Thu, 12 Jan 2023 18:26:49 GMT Message-Id: <202301121826.30CIQnmG021174@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 5e5baba880a2 - main - Revert "makefs: don't needlessly require directories to exist" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e5baba880a2cf070872ab538b6a3a105324b302 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5e5baba880a2cf070872ab538b6a3a105324b302 commit 5e5baba880a2cf070872ab538b6a3a105324b302 Author: Brooks Davis AuthorDate: 2023-01-12 18:21:27 +0000 Commit: Brooks Davis CommitDate: 2023-01-12 18:21:27 +0000 Revert "makefs: don't needlessly require directories to exist" I pushed prematurely and this version is broken. This reverts commit 794154149f95d0cbc11aade166f9da919747e397. --- usr.sbin/makefs/zfs/fs.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/usr.sbin/makefs/zfs/fs.c b/usr.sbin/makefs/zfs/fs.c index 7f74e300f5d7..3cf328122df8 100644 --- a/usr.sbin/makefs/zfs/fs.c +++ b/usr.sbin/makefs/zfs/fs.c @@ -292,16 +292,6 @@ fs_open(const fsnode *cur, struct fs_populate_arg *arg, int flags) return (fd); } -static int -fs_open_can_fail(const fsnode *cur, struct fs_populate_arg *arg, int flags) -{ - char path[PATH_MAX]; - - fs_populate_path(cur, arg, path, sizeof(path), &fd); - - return (openat(fd, path, flags)); -} - static void fs_readlink(const fsnode *cur, struct fs_populate_arg *arg, char *buf, size_t bufsz) @@ -600,12 +590,7 @@ fs_populate_dir(fsnode *cur, struct fs_populate_arg *arg) */ if (!SLIST_EMPTY(&arg->dirs)) { fs_populate_dirent(arg, cur, dnid); - /* - * We only need the directory fd if we're finding files in - * it. If it's just there for other directories or - * files using contents= we don't need to succeed here. - */ - dirfd = fs_open_can_fail(cur, arg, O_DIRECTORY | O_RDONLY); + dirfd = fs_open(cur, arg, O_DIRECTORY | O_RDONLY); } else { arg->rootdirid = dnid; dirfd = arg->rootdirfd;