mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: [v6.6][PATCH 02/57] Revert "eventfs: Check for NULL ef in eventfs_set_attr()"
Date: Tue, 06 Feb 2024 07:09:07 -0500	[thread overview]
Message-ID: <20240206120946.700644630@rostedt.homelinux.com> (raw)
In-Reply-To: <20240206120905.570408983@rostedt.homelinux.com>

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

This reverts commit d8f492a059728bbd397defbc9b8d2f4159d869b5.

The eventfs was not designed properly and may have some hidden bugs in it.
Linus rewrote it properly and I trust his version more than this one. Revert
the backported patches for 6.6 and re-apply all the changes to make it
equivalent to Linus's version.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/tracefs/event_inode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c
index efbdc47c74dc..5fcfb634fec2 100644
--- a/fs/tracefs/event_inode.c
+++ b/fs/tracefs/event_inode.c
@@ -113,14 +113,14 @@ static int eventfs_set_attr(struct mnt_idmap *idmap, struct dentry *dentry,
 
 	mutex_lock(&eventfs_mutex);
 	ef = dentry->d_fsdata;
-	if (ef && ef->is_freed) {
+	if (ef->is_freed) {
 		/* Do not allow changes if the event is about to be removed. */
 		mutex_unlock(&eventfs_mutex);
 		return -ENODEV;
 	}
 
 	ret = simple_setattr(idmap, dentry, iattr);
-	if (!ret && ef)
+	if (!ret)
 		update_attr(ef, iattr);
 	mutex_unlock(&eventfs_mutex);
 	return ret;
-- 
2.43.0



  parent reply	other threads:[~2024-02-06 12:09 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06 12:09 [v6.6][PATCH 00/57] eventfs: Linus's updates for 6.6 Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 01/57] Revert "eventfs: Do not allow NULL parent to eventfs_start_creating()" Steven Rostedt
2024-02-06 12:09 ` Steven Rostedt [this message]
2024-02-06 12:09 ` [v6.6][PATCH 03/57] Revert "eventfs: Use simple_recursive_removal() to clean up dentries" Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 04/57] Revert "eventfs: Delete eventfs_inode when the last dentry is freed" Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 05/57] Revert "eventfs: Save ownership and mode" Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 06/57] Revert "eventfs: Remove "is_freed" union with rcu head" Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 07/57] eventfs: Remove eventfs_file and just use eventfs_inode Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 08/57] eventfs: Use eventfs_remove_events_dir() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 09/57] eventfs: Use ERR_CAST() in eventfs_create_events_dir() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 10/57] eventfs: Fix failure path " Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 11/57] tracefs/eventfs: Modify mismatched function name Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 12/57] eventfs: Fix WARN_ON() in create_file_dentry() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 13/57] eventfs: Fix typo in eventfs_inode union comment Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 14/57] eventfs: Remove extra dget() in eventfs_create_events_dir() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 15/57] eventfs: Fix kerneldoc of eventfs_remove_rec() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 16/57] eventfs: Remove "is_freed" union with rcu head Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 17/57] eventfs: Have a free_ei() that just frees the eventfs_inode Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 18/57] eventfs: Test for ei->is_freed when accessing ei->dentry Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 19/57] eventfs: Save ownership and mode Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 20/57] eventfs: Hold eventfs_mutex when calling callback functions Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 21/57] eventfs: Delete eventfs_inode when the last dentry is freed Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 22/57] eventfs: Remove special processing of dput() of events directory Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 23/57] eventfs: Use simple_recursive_removal() to clean up dentries Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 24/57] eventfs: Remove expectation that ei->is_freed means ei->dentry == NULL Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 25/57] eventfs: Do not invalidate dentry in create_file/dir_dentry() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 26/57] eventfs: Use GFP_NOFS for allocation when eventfs_mutex is held Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 27/57] eventfs: Move taking of inode_lock into dcache_dir_open_wrapper() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 28/57] eventfs: Do not allow NULL parent to eventfs_start_creating() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 29/57] eventfs: Make sure that parent->d_inode is locked in creating files/dirs Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 30/57] eventfs: Fix events beyond NAME_MAX blocking tasks Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 31/57] eventfs: Have event files and directories default to parent uid and gid Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 32/57] eventfs: Fix file and directory uid and gid ownership Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 33/57] tracefs: Check for dentry->d_inode exists in set_gid() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 34/57] eventfs: Fix bitwise fields for "is_events" Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 35/57] eventfs: Remove "lookup" parameter from create_dir/file_dentry() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 36/57] eventfs: Stop using dcache_readdir() for getdents() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 37/57] tracefs/eventfs: Use root and instance inodes as default ownership Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 38/57] eventfs: Have eventfs_iterate() stop immediately if ei->is_freed is set Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 39/57] eventfs: Do ctx->pos update for all iterations in eventfs_iterate() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 40/57] eventfs: Read ei->entries before ei->children " Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 41/57] eventfs: Shortcut eventfs_iterate() by skipping entries already read Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 42/57] eventfs: Have the inodes all for files and directories all be the same Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 43/57] eventfs: Do not create dentries nor inodes in iterate_shared Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 44/57] eventfs: Use kcalloc() instead of kzalloc() Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 45/57] eventfs: Save directory inodes in the eventfs_inode structure Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 46/57] tracefs: remove stale update_gid code Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 47/57] tracefs: Zero out the tracefs_inode when allocating it Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 48/57] eventfs: Initialize the tracefs inode properly Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 49/57] tracefs: Avoid using the ei->dentry pointer unnecessarily Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 50/57] tracefs: dentry lookup crapectomy Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 51/57] eventfs: Remove unused d_parent pointer field Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 52/57] eventfs: Clean up dentry ops and add revalidate function Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 53/57] eventfs: Get rid of dentry pointers without refcounts Steven Rostedt
2024-02-06 12:09 ` [v6.6][PATCH 54/57] eventfs: Warn if an eventfs_inode is freed without is_freed being set Steven Rostedt
2024-02-06 12:10 ` [v6.6][PATCH 55/57] eventfs: Restructure eventfs_inode structure to be more condensed Steven Rostedt
2024-02-06 12:10 ` [v6.6][PATCH 56/57] eventfs: Remove fsnotify*() functions from lookup() Steven Rostedt
2024-02-06 12:10 ` [v6.6][PATCH 57/57] eventfs: Keep all directory links at 1 Steven Rostedt
2024-02-20 15:11 ` [v6.6][PATCH 00/57] eventfs: Linus's updates for 6.6 Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240206120946.700644630@rostedt.homelinux.com \
    --to=rostedt@goodmis.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®