On Sun, 23 Jul 2023 01:07:01 +0530 Ajay Kaher <akaher@xxxxxxxxxx> 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); > +} > +