diff options
Diffstat (limited to 'fs/jffs2/super.c')
-rw-r--r-- | fs/jffs2/super.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index ffd8e84b22cc..9d0521451f59 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c | |||
@@ -151,7 +151,10 @@ static struct super_block *jffs2_get_sb_mtd(struct file_system_type *fs_type, | |||
151 | 151 | ||
152 | sb->s_op = &jffs2_super_operations; | 152 | sb->s_op = &jffs2_super_operations; |
153 | sb->s_flags = flags | MS_NOATIME; | 153 | sb->s_flags = flags | MS_NOATIME; |
154 | 154 | sb->s_xattr = jffs2_xattr_handlers; | |
155 | #ifdef CONFIG_JFFS2_FS_POSIX_ACL | ||
156 | sb->s_flags |= MS_POSIXACL; | ||
157 | #endif | ||
155 | ret = jffs2_do_fill_super(sb, data, flags & MS_SILENT ? 1 : 0); | 158 | ret = jffs2_do_fill_super(sb, data, flags & MS_SILENT ? 1 : 0); |
156 | 159 | ||
157 | if (ret) { | 160 | if (ret) { |
@@ -293,6 +296,7 @@ static void jffs2_put_super (struct super_block *sb) | |||
293 | kfree(c->blocks); | 296 | kfree(c->blocks); |
294 | jffs2_flash_cleanup(c); | 297 | jffs2_flash_cleanup(c); |
295 | kfree(c->inocache_list); | 298 | kfree(c->inocache_list); |
299 | jffs2_clear_xattr_subsystem(c); | ||
296 | if (c->mtd->sync) | 300 | if (c->mtd->sync) |
297 | c->mtd->sync(c->mtd); | 301 | c->mtd->sync(c->mtd); |
298 | 302 | ||
@@ -320,6 +324,18 @@ static int __init init_jffs2_fs(void) | |||
320 | { | 324 | { |
321 | int ret; | 325 | int ret; |
322 | 326 | ||
327 | /* Paranoia checks for on-medium structures. If we ask GCC | ||
328 | to pack them with __attribute__((packed)) then it _also_ | ||
329 | assumes that they're not aligned -- so it emits crappy | ||
330 | code on some architectures. Ideally we want an attribute | ||
331 | which means just 'no padding', without the alignment | ||
332 | thing. But GCC doesn't have that -- we have to just | ||
333 | hope the structs are the right sizes, instead. */ | ||
334 | BUG_ON(sizeof(struct jffs2_unknown_node) != 12); | ||
335 | BUG_ON(sizeof(struct jffs2_raw_dirent) != 40); | ||
336 | BUG_ON(sizeof(struct jffs2_raw_inode) != 68); | ||
337 | BUG_ON(sizeof(struct jffs2_raw_summary) != 32); | ||
338 | |||
323 | printk(KERN_INFO "JFFS2 version 2.2." | 339 | printk(KERN_INFO "JFFS2 version 2.2." |
324 | #ifdef CONFIG_JFFS2_FS_WRITEBUFFER | 340 | #ifdef CONFIG_JFFS2_FS_WRITEBUFFER |
325 | " (NAND)" | 341 | " (NAND)" |
@@ -327,7 +343,7 @@ static int __init init_jffs2_fs(void) | |||
327 | #ifdef CONFIG_JFFS2_SUMMARY | 343 | #ifdef CONFIG_JFFS2_SUMMARY |
328 | " (SUMMARY) " | 344 | " (SUMMARY) " |
329 | #endif | 345 | #endif |
330 | " (C) 2001-2003 Red Hat, Inc.\n"); | 346 | " (C) 2001-2006 Red Hat, Inc.\n"); |
331 | 347 | ||
332 | jffs2_inode_cachep = kmem_cache_create("jffs2_i", | 348 | jffs2_inode_cachep = kmem_cache_create("jffs2_i", |
333 | sizeof(struct jffs2_inode_info), | 349 | sizeof(struct jffs2_inode_info), |