diff options
Diffstat (limited to 'fs/jffs2/super.c')
-rw-r--r-- | fs/jffs2/super.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 662bba099501..c86041b866a4 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/smp_lock.h> | ||
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/list.h> | 16 | #include <linux/list.h> |
18 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
@@ -146,6 +145,7 @@ static const struct super_operations jffs2_super_operations = | |||
146 | static int jffs2_fill_super(struct super_block *sb, void *data, int silent) | 145 | static int jffs2_fill_super(struct super_block *sb, void *data, int silent) |
147 | { | 146 | { |
148 | struct jffs2_sb_info *c; | 147 | struct jffs2_sb_info *c; |
148 | int ret; | ||
149 | 149 | ||
150 | D1(printk(KERN_DEBUG "jffs2_get_sb_mtd():" | 150 | D1(printk(KERN_DEBUG "jffs2_get_sb_mtd():" |
151 | " New superblock for device %d (\"%s\")\n", | 151 | " New superblock for device %d (\"%s\")\n", |
@@ -175,15 +175,15 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent) | |||
175 | #ifdef CONFIG_JFFS2_FS_POSIX_ACL | 175 | #ifdef CONFIG_JFFS2_FS_POSIX_ACL |
176 | sb->s_flags |= MS_POSIXACL; | 176 | sb->s_flags |= MS_POSIXACL; |
177 | #endif | 177 | #endif |
178 | return jffs2_do_fill_super(sb, data, silent); | 178 | ret = jffs2_do_fill_super(sb, data, silent); |
179 | return ret; | ||
179 | } | 180 | } |
180 | 181 | ||
181 | static int jffs2_get_sb(struct file_system_type *fs_type, | 182 | static struct dentry *jffs2_mount(struct file_system_type *fs_type, |
182 | int flags, const char *dev_name, | 183 | int flags, const char *dev_name, |
183 | void *data, struct vfsmount *mnt) | 184 | void *data) |
184 | { | 185 | { |
185 | return get_sb_mtd(fs_type, flags, dev_name, data, jffs2_fill_super, | 186 | return mount_mtd(fs_type, flags, dev_name, data, jffs2_fill_super); |
186 | mnt); | ||
187 | } | 187 | } |
188 | 188 | ||
189 | static void jffs2_put_super (struct super_block *sb) | 189 | static void jffs2_put_super (struct super_block *sb) |
@@ -192,8 +192,6 @@ static void jffs2_put_super (struct super_block *sb) | |||
192 | 192 | ||
193 | D2(printk(KERN_DEBUG "jffs2: jffs2_put_super()\n")); | 193 | D2(printk(KERN_DEBUG "jffs2: jffs2_put_super()\n")); |
194 | 194 | ||
195 | lock_kernel(); | ||
196 | |||
197 | if (sb->s_dirt) | 195 | if (sb->s_dirt) |
198 | jffs2_write_super(sb); | 196 | jffs2_write_super(sb); |
199 | 197 | ||
@@ -215,8 +213,6 @@ static void jffs2_put_super (struct super_block *sb) | |||
215 | if (c->mtd->sync) | 213 | if (c->mtd->sync) |
216 | c->mtd->sync(c->mtd); | 214 | c->mtd->sync(c->mtd); |
217 | 215 | ||
218 | unlock_kernel(); | ||
219 | |||
220 | D1(printk(KERN_DEBUG "jffs2_put_super returning\n")); | 216 | D1(printk(KERN_DEBUG "jffs2_put_super returning\n")); |
221 | } | 217 | } |
222 | 218 | ||
@@ -232,7 +228,7 @@ static void jffs2_kill_sb(struct super_block *sb) | |||
232 | static struct file_system_type jffs2_fs_type = { | 228 | static struct file_system_type jffs2_fs_type = { |
233 | .owner = THIS_MODULE, | 229 | .owner = THIS_MODULE, |
234 | .name = "jffs2", | 230 | .name = "jffs2", |
235 | .get_sb = jffs2_get_sb, | 231 | .mount = jffs2_mount, |
236 | .kill_sb = jffs2_kill_sb, | 232 | .kill_sb = jffs2_kill_sb, |
237 | }; | 233 | }; |
238 | 234 | ||