Re: [PATCH 6/8] eventfs: adding eventfs lookup, read, open functions

Steven Rostedt
2023-01-23T16:54:16Z

On Sun, 22 Jan 2023 22:37:05 +0530
Ajay Kaher <akaher@vmware.com> wrote:

> +int dcache_dir_open_wrapper(struct inode *inode, struct file *file)
> +{
> + struct tracefs_inode *ti;
> + struct eventfs_inode *ei;
> + struct eventfs_file *ef;
> + struct inode *f_inode = file_inode(file);
> + struct dentry *dentry = file_dentry(file);
> +
> + ti = get_tracefs(f_inode);
> + if (!(ti->flags & TRACEFS_EVENT_INODE))
> + return -EINVAL;
> +
> + ei = ti->private;
> + list_for_each_entry(ef, &ei->e_top_files, list) {
> + if (ef->created) {
> + dget(ef->dentry);
> + continue;
> + }
> +
> + ef->created = true;
> +
> + inode_lock(dentry->d_inode);

> + if (ef->ei)

There's an extra space at the end of the above line.

-- Steve

> + ef->dentry = eventfs_create_dir(ef->name, ef->mode, dentry,
> + ef->data, ef->fop, ef->iop, 1);
> + else
> + ef->dentry = eventfs_create_file(ef->name, ef->mode, dentry,
> + ef->data, ef->fop, 1);
> + inode_unlock(dentry->d_inode);
> +
> + if (IS_ERR_OR_NULL(ef->dentry)) {
> + ef->created = false;
> + } else {
> + if (ef->ei)
> + eventfs_post_create_dir(ef);
> + ef->dentry->d_fsdata = ef;
> + }
> + }
> + return dcache_dir_open(inode, file);
> +}
> +