[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240130145655.073ff344@gandalf.local.home>
Date: Tue, 30 Jan 2024 14:56:55 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH 2/6] eventfsfs: initialize the tracefs inode properly
On Tue, 30 Jan 2024 14:48:02 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:
> The ti is allocated from fs/tracefs/inode.c that has:
>
> static struct inode *tracefs_alloc_inode(struct super_block *sb)
> {
> struct tracefs_inode *ti;
>
> ti = kmem_cache_alloc(tracefs_inode_cachep, GFP_KERNEL);
I could also just add __GFP_ZERO so that all of it is initialized to zero,
and then we don't need to assign NULL to any part of it.
-- Steve
> if (!ti)
> return NULL;
>
> ti->flags = 0;
>
> return &ti->vfs_inode;
> }
>
>
Powered by blists - more mailing lists