[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230726165116.64664689@rorschach.local.home>
Date: Wed, 26 Jul 2023 16:51:16 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Ajay Kaher <akaher@...are.com>
Cc: shuah@...nel.org, mhiramat@...nel.org, chinglinyu@...gle.com,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, lkp@...el.com,
namit@...are.com, oe-lkp@...ts.linux.dev, amakhalov@...are.com,
er.ajay.kaher@...il.com, srivatsa@...il.mit.edu, tkundu@...are.com,
vsirnapalli@...are.com
Subject: Re: [PATCH v5 06/10] eventfs: Implement eventfs lookup, read, open
functions
On Sun, 23 Jul 2023 01:07:01 +0530
Ajay Kaher <akaher@...are.com> wrote:
> +void eventfs_set_ef_status_free(struct dentry *dentry)
> +{
> + struct tracefs_inode *ti_parent;
> + struct eventfs_file *ef;
> +
> + mutex_lock(&eventfs_mutex);
> + ti_parent = get_tracefs(dentry->d_parent->d_inode);
> + if (!ti_parent || !(ti_parent->flags & TRACEFS_EVENT_INODE))
> + goto out;
> +
> + ef = dentry->d_fsdata;
> + if (!ef)
> + goto out;
> +
> + /*
> + * If ef was freed, then the LSB bit is set for d_fsdata.
> + * But this should not happen, as it should still have a
> + * ref count that prevents it. Warn in case it does.
> + */
> + if (WARN_ON_ONCE((unsigned long)ef & 1))
> + goto out;
Can you add this part to Patch 8: eventfs: Implement removal of meta data from eventfs ?
That way the pointer logic is all added together.
-- Steve
> +
> + dentry->d_fsdata = NULL;
> + ef->dentry = NULL;
> +out:
> + mutex_unlock(&eventfs_mutex);
> +}
> +
Powered by blists - more mailing lists