Skip to content

Commit 78c7051

Browse files
committed
tracing: Remove unneeded event_mutex lock in event_trigger_regex_release()
In event_trigger_regex_release(), the only code is: mutex_lock(&event_mutex); if (file->f_mode & FMODE_READ) seq_release(inode, file); mutex_unlock(&event_mutex); return 0; There's nothing special about the file->f_mode or the seq_release() that requires any locking. Remove the unnecessary locks. Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Tom Zanussi <zanussi@kernel.org> Link: https://patch.msgid.link/20251125214031.975879283@kernel.org Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent b052d70 commit 78c7051

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

kernel/trace/trace_events_trigger.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,9 @@ static ssize_t event_trigger_regex_write(struct file *file,
314314

315315
static int event_trigger_regex_release(struct inode *inode, struct file *file)
316316
{
317-
mutex_lock(&event_mutex);
318-
319317
if (file->f_mode & FMODE_READ)
320318
seq_release(inode, file);
321319

322-
mutex_unlock(&event_mutex);
323-
324320
return 0;
325321
}
326322

0 commit comments

Comments
 (0)