diff options
Diffstat (limited to 'fs/jffs2/super.c')
-rw-r--r-- | fs/jffs2/super.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 662bba099501..58dd9cf06206 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c | |||
@@ -146,14 +146,19 @@ static const struct super_operations jffs2_super_operations = | |||
146 | static int jffs2_fill_super(struct super_block *sb, void *data, int silent) | 146 | static int jffs2_fill_super(struct super_block *sb, void *data, int silent) |
147 | { | 147 | { |
148 | struct jffs2_sb_info *c; | 148 | struct jffs2_sb_info *c; |
149 | int ret; | ||
150 | |||
151 | lock_kernel(); | ||
149 | 152 | ||
150 | D1(printk(KERN_DEBUG "jffs2_get_sb_mtd():" | 153 | D1(printk(KERN_DEBUG "jffs2_get_sb_mtd():" |
151 | " New superblock for device %d (\"%s\")\n", | 154 | " New superblock for device %d (\"%s\")\n", |
152 | sb->s_mtd->index, sb->s_mtd->name)); | 155 | sb->s_mtd->index, sb->s_mtd->name)); |
153 | 156 | ||
154 | c = kzalloc(sizeof(*c), GFP_KERNEL); | 157 | c = kzalloc(sizeof(*c), GFP_KERNEL); |
155 | if (!c) | 158 | if (!c) { |
159 | unlock_kernel(); | ||
156 | return -ENOMEM; | 160 | return -ENOMEM; |
161 | } | ||
157 | 162 | ||
158 | c->mtd = sb->s_mtd; | 163 | c->mtd = sb->s_mtd; |
159 | c->os_priv = sb; | 164 | c->os_priv = sb; |
@@ -175,7 +180,9 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent) | |||
175 | #ifdef CONFIG_JFFS2_FS_POSIX_ACL | 180 | #ifdef CONFIG_JFFS2_FS_POSIX_ACL |
176 | sb->s_flags |= MS_POSIXACL; | 181 | sb->s_flags |= MS_POSIXACL; |
177 | #endif | 182 | #endif |
178 | return jffs2_do_fill_super(sb, data, silent); | 183 | ret = jffs2_do_fill_super(sb, data, silent); |
184 | unlock_kernel(); | ||
185 | return ret; | ||
179 | } | 186 | } |
180 | 187 | ||
181 | static int jffs2_get_sb(struct file_system_type *fs_type, | 188 | static int jffs2_get_sb(struct file_system_type *fs_type, |