Commit f42ba7ce authored by Patrick Mochel's avatar Patrick Mochel

driverfs: Remove struct driver_file_entry::parent, as we can get to it by the dentry

of the directory itself
parent a4a9a623
...@@ -654,11 +654,6 @@ driverfs_create_file(struct driver_file_entry * entry, ...@@ -654,11 +654,6 @@ driverfs_create_file(struct driver_file_entry * entry,
if (!IS_ERR(dentry)) { if (!IS_ERR(dentry)) {
dentry->d_fsdata = (void *)entry; dentry->d_fsdata = (void *)entry;
error = driverfs_create(parent->dentry->d_inode,dentry,entry->mode); error = driverfs_create(parent->dentry->d_inode,dentry,entry->mode);
/* Still good? Ok, then fill in the blanks: */
if (!error) {
entry->parent = parent;
}
} else } else
error = PTR_ERR(dentry); error = PTR_ERR(dentry);
up(&parent->dentry->d_inode->i_sem); up(&parent->dentry->d_inode->i_sem);
...@@ -699,10 +694,6 @@ int driverfs_create_symlink(struct driver_dir_entry * parent, ...@@ -699,10 +694,6 @@ int driverfs_create_symlink(struct driver_dir_entry * parent,
if (!IS_ERR(dentry)) { if (!IS_ERR(dentry)) {
dentry->d_fsdata = (void *)entry; dentry->d_fsdata = (void *)entry;
error = driverfs_symlink(parent->dentry->d_inode,dentry,target); error = driverfs_symlink(parent->dentry->d_inode,dentry,target);
if (!error) {
dentry->d_inode->u.generic_ip = (void *)entry;
entry->parent = parent;
}
} else } else
error = PTR_ERR(dentry); error = PTR_ERR(dentry);
up(&parent->dentry->d_inode->i_sem); up(&parent->dentry->d_inode->i_sem);
......
...@@ -35,7 +35,6 @@ struct driver_dir_entry { ...@@ -35,7 +35,6 @@ struct driver_dir_entry {
struct device; struct device;
struct driver_file_entry { struct driver_file_entry {
struct driver_dir_entry * parent;
char * name; char * name;
mode_t mode; mode_t mode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment