aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/ibmasm/ibmasmfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/ibmasm/ibmasmfs.c')
-rw-r--r--drivers/misc/ibmasm/ibmasmfs.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c
index 35361753b487..1c034b80d408 100644
--- a/drivers/misc/ibmasm/ibmasmfs.c
+++ b/drivers/misc/ibmasm/ibmasmfs.c
@@ -87,7 +87,7 @@
87static LIST_HEAD(service_processors); 87static LIST_HEAD(service_processors);
88 88
89static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode); 89static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode);
90static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root); 90static void ibmasmfs_create_files (struct super_block *sb);
91static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent); 91static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent);
92 92
93 93
@@ -114,7 +114,6 @@ static struct file_system_type ibmasmfs_type = {
114static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent) 114static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent)
115{ 115{
116 struct inode *root; 116 struct inode *root;
117 struct dentry *root_dentry;
118 117
119 sb->s_blocksize = PAGE_CACHE_SIZE; 118 sb->s_blocksize = PAGE_CACHE_SIZE;
120 sb->s_blocksize_bits = PAGE_CACHE_SHIFT; 119 sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
@@ -129,14 +128,11 @@ static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent)
129 root->i_op = &simple_dir_inode_operations; 128 root->i_op = &simple_dir_inode_operations;
130 root->i_fop = ibmasmfs_dir_ops; 129 root->i_fop = ibmasmfs_dir_ops;
131 130
132 root_dentry = d_alloc_root(root); 131 sb->s_root = d_make_root(root);
133 if (!root_dentry) { 132 if (!sb->s_root)
134 iput(root);
135 return -ENOMEM; 133 return -ENOMEM;
136 }
137 sb->s_root = root_dentry;
138 134
139 ibmasmfs_create_files(sb, root_dentry); 135 ibmasmfs_create_files(sb);
140 return 0; 136 return 0;
141} 137}
142 138
@@ -612,7 +608,7 @@ static const struct file_operations remote_settings_fops = {
612}; 608};
613 609
614 610
615static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root) 611static void ibmasmfs_create_files (struct super_block *sb)
616{ 612{
617 struct list_head *entry; 613 struct list_head *entry;
618 struct service_processor *sp; 614 struct service_processor *sp;
@@ -621,7 +617,7 @@ static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root)
621 struct dentry *dir; 617 struct dentry *dir;
622 struct dentry *remote_dir; 618 struct dentry *remote_dir;
623 sp = list_entry(entry, struct service_processor, node); 619 sp = list_entry(entry, struct service_processor, node);
624 dir = ibmasmfs_create_dir(sb, root, sp->dirname); 620 dir = ibmasmfs_create_dir(sb, sb->s_root, sp->dirname);
625 if (!dir) 621 if (!dir)
626 continue; 622 continue;
627 623