From nobody Mon Jan 20 16:20:40 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 4YcFtx0zGbz5kK4c; Mon, 20 Jan 2025 16:20:41 +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 4YcFtx0DF1z3RRv; Mon, 20 Jan 2025 16:20:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737390041; 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=AhUoAeVj0tuBXalptBZU9X2jFfcQmwEo/J4FJ6mG0so=; b=J7x9hXCoN8TYspCfwu5obrQU7m6eh5K/6NfEJOLdxjU6tkCVvDDqkQUOrIguYxUJN2+nr9 hpKA9XmZ5rRHSijF4LCV+UAZzfqbpoGEh6sjiADm28MBORW+bQjpnFh6xHzZjCtyOdrUnW /ZYb9CJ+cggjuj222SvBb7IVffQbnNDnpGMBjJfa/VxpAYR5IsGI450CU9AQ78VGiU5rtd uFGj4OR/U7g9gIAl4Ih6wZVvP9OnvnNUTavRJfO3PPgWwjOYJcBvOrcCm2slBSmYpEuEvA BsCCcCOktCOwBP/0FYW2e/Pmr3QTpf+ksSqB/XL90kdj96pbt0X/+aHG5Ts4cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737390041; 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=AhUoAeVj0tuBXalptBZU9X2jFfcQmwEo/J4FJ6mG0so=; b=iglXSmGHGgWC+rTODnsQ+JMM8fXl5EDKjRIR2BmbSXtaoe2KogZmxbYOqhWkLhrB+2EEhE RhmSuyEm2DCLVDcfN3m7v21zx0kwLKl1vtYWjeAfeFRc1gOlyGkL7E3S6EqfnX5rEYYwP5 ED0lBhyIakSyMc0OJquVPd++QDZPivroq3HxvP7s+jKwtindyYHFbTEWrvx6W/gSR5vko9 NwNuRWGZYWQGIS7fOfiwA/UI1YVRME8RYR+Q3gbksO5RMjRDW9ShO0ehIqPJISE4IBPsI6 S0EUU4SuiYmX52IdPKkWrX/IBFB9F2ELfUTi8phqX2C4D25XwgUde1pe8VmoDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737390041; a=rsa-sha256; cv=none; b=aUkATB2j8koUIPWY0SFX3B7X6XcpVmg7jBr+qqTed3kYpTOglnoyBhKGguXnY1YQA/jOr3 O7Ke6GyHU32xlpDJU7Bn1fkTUXS/WJJSNRo013TT+g6zO+BsQREGPQFyZupogHDfCJsNNP 8Lu9dPDFMEytOL4y7jmAW+JXlaxk38hAc5MzjGMLgdwv4aJrkvOY1HL19nofoC7Fd80MPz lCl9rKetBL5NiY6kJTT8moUziatRVN2hNPPD7WXMXQ4SaMGx6lAyxf2zMMrD0SS1ejjfT1 zr5vZsglurz22reGJ8LwGFj4tMxwrdu2CJdy8DMTnNYNadAlDQ6tdfbVBRpGKw== 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 4YcFtw6xcXzC4M; Mon, 20 Jan 2025 16:20:40 +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 50KGKeNE003691; Mon, 20 Jan 2025 16:20:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KGKeiC003686; Mon, 20 Jan 2025 16:20:40 GMT (envelope-from git) Date: Mon, 20 Jan 2025 16:20:40 GMT Message-Id: <202501201620.50KGKeiC003686@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: 4ea15740a873 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 4ea15740a87314302dcb79d48b9280be199b0173 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=4ea15740a87314302dcb79d48b9280be199b0173 commit 4ea15740a87314302dcb79d48b9280be199b0173 Author: Claudiu AuthorDate: 2024-10-13 20:00:42 +0000 Commit: Alan Somers CommitDate: 2025-01-20 16:20:20 +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 729feb0329a4..a42ada6a5469 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -1327,6 +1327,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; @@ -1344,13 +1345,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)