Commit f747500b authored by jan.koester's avatar jan.koester
Browse files

some fixes

parent f4e2cfd3
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -504,6 +504,26 @@ struct dentry *tracefs_end_creating(struct dentry *dentry)
	return dentry;
}

/* Find the inode that this will use for default */
static struct inode *instance_inode(struct dentry *parent, struct inode *inode)
{
	struct tracefs_inode *ti;

	/* If parent is NULL then use root inode */
	if (!parent)
		return d_inode(inode->i_sb->s_root);

	/* Find the inode that is flagged as an instance or the root inode */
	while (!IS_ROOT(parent)) {
		ti = get_tracefs(d_inode(parent));
		if (ti->flags & TRACEFS_INSTANCE_INODE)
			break;
		parent = parent->d_parent;
	}

	return d_inode(parent);
}

/**
 * eventfs_start_creating - start the process of creating a dentry
 * @name: Name of the file created for the dentry