From nobody Mon Jan 20 22:29:01 2025 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 4YcQ3y0fHhz5l3Sh; Mon, 20 Jan 2025 22:29:02 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YcQ3x4xNbz4MxD; Mon, 20 Jan 2025 22:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737412141; 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=E9gn9D0j9BSG/lWEHx1DLHqV0Y7nUpgPUaMYp1ODZ9c=; b=tTRuGou5veBA+mVwz1oenmtEqUdUPBfJMaXRFK6wlcB1GvDRqv4ATi0O1X/HVm0WUZchGX nvjMA78zG9HD8u+MOgGfjMH6FrM9fkf+bV0IiONLlcvy9l0T5ArlcfupufBPdQk2OhXxp5 piQhvfzFG4Iuf5hxm7Nqd6V+OabiI8AXYiPAslGeCBYcu5Myu24VH8FIaEhOcuQxNBumrZ 8ZMaP3/r12n4Lwo2sexSbuBFsTk7u84lbdhUyFSj1l1UbxmvLohXSAb8UN1kLfVm/0BZ2Y Ur/wUcAMvxNOeKFOLIYZ/iyOBzwdaOmIE8FkRFA1K+YHm1pHFB4qB8k1kADJRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737412141; 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=E9gn9D0j9BSG/lWEHx1DLHqV0Y7nUpgPUaMYp1ODZ9c=; b=kWP7DoBFPOHOayhjye1ykastEQQQor0BZs/LZ14kFRaskPeS3V88akMRAZGvoWpw7+1qgk WJOZM90e1NaKnY1oGNBwzJ94BLg/j8DkuDY8eJLKPn7pr4OkV/SirNWLZWo1s2dJoYz66Q pD85uNxmyeZdmWIHV84HLHHFitMbHgFwTvfS/nEhggwHBdfRINXtMvaiW0dhtnu71c9nyv 78bZEZ8642QCWwUreNtHO2/rAzVSVFwnlldGzj9I0M43jLfGcKJCKUeqYFPFmuVifCkRf8 M4odVepPSFmXxaAQhWEY3CG+DgZFRo6ebW5TVkZzSiuhrlFIxkRj3vEESKZwYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737412141; a=rsa-sha256; cv=none; b=cz5vXIRrzV8R07SGOJE2QcUIFxLwBiVmQYw2jr0iOR2+hNFOc/EQ46/WOPzbB0T/9Nt4gM JSipghK0Ib/oBxUZoZ5NDrpa36Fjq9pyF4ilFMynkwc2NJyrOPuo9PFA0UYUnZPeY87DQ+ u8wz7g7t5RtPYYIynTcpI1ZHpSXo2JChbtRB7fA+6fgQWTFiZOHWmK5Aw/1pyRP2QY58Tq aY3luw/hI9eilwesDWfV3wV4Od1Bqq9K6U/DEp9UX758/nJ4GOdKMJpQ02+vTTzskhMZKy H+GhmOQBZpS4r9VuNXxHmp6jUaA26w9fNVtWo5pXerLhohfMB8QsYtY0wR//6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YcQ3x4VbnzgDP; Mon, 20 Jan 2025 22:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KMT1l4089134; Mon, 20 Jan 2025 22:29:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KMT1vr089131; Mon, 20 Jan 2025 22:29:01 GMT (envelope-from git) Date: Mon, 20 Jan 2025 22:29:01 GMT Message-Id: <202501202229.50KMT1vr089131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 06b782abaafe - stable/13 - tmpfs: remove duplicate flags check in tmpfs_rmdir 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 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/13 X-Git-Reftype: branch X-Git-Commit: 06b782abaafe56674fc2be847dea4ab28c1cddf0 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=06b782abaafe56674fc2be847dea4ab28c1cddf0 commit 06b782abaafe56674fc2be847dea4ab28c1cddf0 Author: Claudiu AuthorDate: 2024-10-13 20:00:42 +0000 Commit: Alan Somers CommitDate: 2025-01-20 22:27:26 +0000 tmpfs: remove duplicate flags check in tmpfs_rmdir Reviewed By: asomers Differential Revision: https://reviews.freebsd.org/D47100 (cherry picked from commit ec22e705c266ff629cc5ec47b84f67ba02b7b924) --- sys/fs/tmpfs/tmpfs_vnops.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 3c61938f8cae..f1add1ed6ab9 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -1307,6 +1307,7 @@ tmpfs_rmdir(struct vop_rmdir_args *v) goto out; } + /* Check flags to see if we are allowed to remove the directory. */ if ((dnode->tn_flags & APPEND) || (node->tn_flags & (NOUNLINK | IMMUTABLE | APPEND))) { error = EPERM; @@ -1324,13 +1325,6 @@ tmpfs_rmdir(struct vop_rmdir_args *v) v->a_cnp->cn_nameptr, v->a_cnp->cn_namelen)); - /* Check flags to see if we are allowed to remove the directory. */ - if ((dnode->tn_flags & APPEND) != 0 || - (node->tn_flags & (NOUNLINK | IMMUTABLE | APPEND)) != 0) { - error = EPERM; - goto out; - } - /* Detach the directory entry from the directory (dnode). */ tmpfs_dir_detach(dvp, de); if (v->a_cnp->cn_flags & DOWHITEOUT)