summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-21 16:36:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-21 16:36:41 -0400
commite2a0883e4071237d09b604a342c28b96b44a04b3 (patch)
treeaa56f4d376b5eb1c32358c19c2669c2a94e0e1fd /drivers/misc
parent3a990a52f9f25f45469e272017a31e7a3fda60ed (diff)
parent07c0c5d8b8c122b2f2df9ee574ac3083daefc981 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile 1 from Al Viro: "This is _not_ all; in particular, Miklos' and Jan's stuff is not there yet." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (64 commits) ext4: initialization of ext4_li_mtx needs to be done earlier debugfs-related mode_t whack-a-mole hfsplus: add an ioctl to bless files hfsplus: change finder_info to u32 hfsplus: initialise userflags qnx4: new helper - try_extent() qnx4: get rid of qnx4_bread/qnx4_getblk take removal of PF_FORKNOEXEC to flush_old_exec() trim includes in inode.c um: uml_dup_mmap() relies on ->mmap_sem being held, but activate_mm() doesn't hold it um: embed ->stub_pages[] into mmu_context gadgetfs: list_for_each_safe() misuse ocfs2: fix leaks on failure exits in module_init ecryptfs: make register_filesystem() the last potential failure exit ntfs: forgets to unregister sysctls on register_filesystem() failure logfs: missing cleanup on register_filesystem() failure jfs: mising cleanup on register_filesystem() failure make configfs_pin_fs() return root dentry on success configfs: configfs_create_dir() has parent dentry in dentry->d_parent configfs: sanitize configfs_create() ...
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/ibmasm/ibmasmfs.c16
-rw-r--r--drivers/misc/ibmasm/module.c11
2 files changed, 11 insertions, 16 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
diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c
index 1ccedb71e728..168d8008f460 100644
--- a/drivers/misc/ibmasm/module.c
+++ b/drivers/misc/ibmasm/module.c
@@ -211,18 +211,17 @@ static void __exit ibmasm_exit (void)
211 211
212static int __init ibmasm_init(void) 212static int __init ibmasm_init(void)
213{ 213{
214 int result; 214 int result = pci_register_driver(&ibmasm_driver);
215 if (result)
216 return result;
215 217
216 result = ibmasmfs_register(); 218 result = ibmasmfs_register();
217 if (result) { 219 if (result) {
220 pci_unregister_driver(&ibmasm_driver);
218 err("Failed to register ibmasmfs file system"); 221 err("Failed to register ibmasmfs file system");
219 return result; 222 return result;
220 } 223 }
221 result = pci_register_driver(&ibmasm_driver); 224
222 if (result) {
223 ibmasmfs_unregister();
224 return result;
225 }
226 ibmasm_register_panic_notifier(); 225 ibmasm_register_panic_notifier();
227 info(DRIVER_DESC " version " DRIVER_VERSION " loaded"); 226 info(DRIVER_DESC " version " DRIVER_VERSION " loaded");
228 return 0; 227 return 0;