From nobody Sun Oct 13 21:47:28 2024 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 4XRYqh4TJJz5Ybyd; Sun, 13 Oct 2024 21:47:28 +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 4XRYqh3jQbz4lM8; Sun, 13 Oct 2024 21:47:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728856048; 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=Mk9RZVsTZBHOzBpRHoUuOv2Yvaxpc1/efZruhK2+3tg=; b=UZntvFoL9kvG6XyC5lItv0S/OMbNG5a5A9giQVZIeQimreh+5OXraBUW3XoSYehoTZ6akI KSYqeJeKULeYyWnCX9hvEfzVbqjHEM5+8BLU+IZLNq2vr2xwvR8hwjnrRbBFNHmPt/fRM4 ClzP81hnOPXdOZXeN9wu4acPjM8/jxr+zHkoGhaBUmT8q3+A76q8S1HwsP0BUXem+sZF5T 9tXOTliquDXMx8uxpywj4xOJnjQfw76G4LYjFX7FwdqAkLykotmI67vEDUp+2mwXUR++kA Wp+TKbGP20DNdqO6hAZlejvyPIvatI0vBXkL1KQxgSt+/BjT4EiOhjOu2tW3yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728856048; 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=Mk9RZVsTZBHOzBpRHoUuOv2Yvaxpc1/efZruhK2+3tg=; b=B9Gmovu6NGdXn6yvCR0C2MqXSW5+9oPLLR4Hact7gifDH1aI96DD6IrwdjLd30nbTXGQhL kf4V5QDeYYoHX1nhd/JA8jTU+WgYsOayql1fozHyLIXfn6CeUIdDqagU/Qmd0XUe8iQRYi +yg29dnSQsnOsXFuAbkmgzUnVqNEITozvF5p2NMONiItc+fdoRzrIYeXGEWgJQXlQok1j4 jAvzmEJvxmxRG2YVfDp2BeKOMXdvtm7TBmee8hvPjyA5D2wZb9K+ydnRuO6esR18ps85v6 OOAJdNDzsqvo+2iETqOQSKwZIiKtTQUMeCxuOSXaD0FG+NmPVeeafMmo0+lfYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728856048; a=rsa-sha256; cv=none; b=vi3//CRLxCfLhUa68IHG2NKzkbeB3WThuTbPQJBRq1cT8WkQt+qGtWgU2TxKcaihM9dD2u nlKYqi94gwC+NwKTiJzL6r1unPXMf80HL1nqbIicbUTfjKbVmLPIoUMUDlxT18j+aJ7dbY cEggWULVBlAv38WtsOAK/kqguE581+JVCCDqFXcd3Z52bvZiN77YVZ+C73nlwQOek9g+tK dq45skLkSU4YcWBBZAJXMYS6DkOzmeGDgEpQ2Wz7o1PHQolsSjDjd/Rq4jlz7qAJr1yeqZ E4phNdJw65pFZunS/G173IbLaGNDB+LJ3/koLbOu4MzP/JycCFZTjH/WpkXXEg== 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 4XRYqh33jbz19Td; Sun, 13 Oct 2024 21:47:28 +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 49DLlSP3062796; Sun, 13 Oct 2024 21:47:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49DLlS0K062793; Sun, 13 Oct 2024 21:47:28 GMT (envelope-from git) Date: Sun, 13 Oct 2024 21:47:28 GMT Message-Id: <202410132147.49DLlS0K062793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: ec22e705c266 - main - 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/main X-Git-Reftype: branch X-Git-Commit: ec22e705c266ff629cc5ec47b84f67ba02b7b924 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=ec22e705c266ff629cc5ec47b84f67ba02b7b924 commit ec22e705c266ff629cc5ec47b84f67ba02b7b924 Author: Claudiu AuthorDate: 2024-10-13 20:00:42 +0000 Commit: Alan Somers CommitDate: 2024-10-13 21:43:52 +0000 tmpfs: remove duplicate flags check in tmpfs_rmdir MFC after: 2 weeks Reviewed By: asomers Differential Revision: https://reviews.freebsd.org/D47100 --- 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 fa9945a9074a..c2559a61fe37 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -1344,6 +1344,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; @@ -1361,13 +1362,6 @@ tmpfs_rmdir(struct vop_rmdir_args *v) cnp->cn_nameptr, 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);