lkml.org 
[lkml]   [2023]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 06/10] eventfs: Implement eventfs lookup, read, open functions
On Sun, 23 Jul 2023 01:07:01 +0530
Ajay Kaher <akaher@vmware.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);
> +}
> +

\
 
 \ /
  Last update: 2023-07-26 22:52    [W:0.077 / U:1.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site