diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-02-12 22:08:01 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-20 21:29:37 -0400 |
commit | 318ceed088497d1ca839b1172518ac4cc7096b82 (patch) | |
tree | 7dfd07bfb5e8c5d5dbb0ba4ea523f334c98c66bb /drivers | |
parent | ca85c07809ca19de3391cb79ee1198f3dd91fa8d (diff) |
tidy up after d_make_root() conversion
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/ibmasm/ibmasmfs.c | 14 | ||||
-rw-r--r-- | drivers/oprofile/oprofilefs.c | 9 | ||||
-rw-r--r-- | drivers/usb/core/inode.c | 6 |
3 files changed, 11 insertions, 18 deletions
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c index 15f24f36220..1c034b80d40 100644 --- a/drivers/misc/ibmasm/ibmasmfs.c +++ b/drivers/misc/ibmasm/ibmasmfs.c @@ -87,7 +87,7 @@ static LIST_HEAD(service_processors); static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode); -static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root); +static void ibmasmfs_create_files (struct super_block *sb); static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent); @@ -114,7 +114,6 @@ static struct file_system_type ibmasmfs_type = { static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent) { struct inode *root; - struct dentry *root_dentry; sb->s_blocksize = PAGE_CACHE_SIZE; sb->s_blocksize_bits = PAGE_CACHE_SHIFT; @@ -129,12 +128,11 @@ static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent) root->i_op = &simple_dir_inode_operations; root->i_fop = ibmasmfs_dir_ops; - root_dentry = d_make_root(root); - if (!root_dentry) + sb->s_root = d_make_root(root); + if (!sb->s_root) return -ENOMEM; - sb->s_root = root_dentry; - ibmasmfs_create_files(sb, root_dentry); + ibmasmfs_create_files(sb); return 0; } @@ -610,7 +608,7 @@ static const struct file_operations remote_settings_fops = { }; -static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root) +static void ibmasmfs_create_files (struct super_block *sb) { struct list_head *entry; struct service_processor *sp; @@ -619,7 +617,7 @@ static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root) struct dentry *dir; struct dentry *remote_dir; sp = list_entry(entry, struct service_processor, node); - dir = ibmasmfs_create_dir(sb, root, sp->dirname); + dir = ibmasmfs_create_dir(sb, sb->s_root, sp->dirname); if (!dir) continue; diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c index 277bb70b8d7..ee8fd037bb5 100644 --- a/drivers/oprofile/oprofilefs.c +++ b/drivers/oprofile/oprofilefs.c @@ -238,7 +238,6 @@ struct dentry *oprofilefs_mkdir(struct super_block *sb, static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent) { struct inode *root_inode; - struct dentry *root_dentry; sb->s_blocksize = PAGE_CACHE_SIZE; sb->s_blocksize_bits = PAGE_CACHE_SHIFT; @@ -251,13 +250,11 @@ static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent) return -ENOMEM; root_inode->i_op = &simple_dir_inode_operations; root_inode->i_fop = &simple_dir_operations; - root_dentry = d_make_root(root_inode); - if (!root_dentry) + sb->s_root = d_make_root(root_inode); + if (!sb->s_root) return -ENOMEM; - sb->s_root = root_dentry; - - oprofile_create_files(sb, root_dentry); + oprofile_create_files(sb, sb->s_root); // FIXME: verify kill_litter_super removes our dentries return 0; diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c index bdaef8e3602..06c175aee6a 100644 --- a/drivers/usb/core/inode.c +++ b/drivers/usb/core/inode.c @@ -454,7 +454,6 @@ static const struct super_operations usbfs_ops = { static int usbfs_fill_super(struct super_block *sb, void *data, int silent) { struct inode *inode; - struct dentry *root; sb->s_blocksize = PAGE_CACHE_SIZE; sb->s_blocksize_bits = PAGE_CACHE_SHIFT; @@ -462,12 +461,11 @@ static int usbfs_fill_super(struct super_block *sb, void *data, int silent) sb->s_op = &usbfs_ops; sb->s_time_gran = 1; inode = usbfs_get_inode(sb, S_IFDIR | 0755, 0); - root = d_make_root(inode); - if (!root) { + sb->s_root = d_make_root(inode); + if (!sb->s_root) { dbg("%s: could not get root dentry!",__func__); return -ENOMEM; } - sb->s_root = root; return 0; } |