aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/super.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-20 17:50:31 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-20 17:50:31 -0400
commitbe967b7e2f7747a5ebf2a07ee627d9338491e784 (patch)
treef42b82601209a52b8ee478e36d8b21543ab03060 /fs/jffs2/super.c
parenteef11427edcb821b63920219f89379fab84198b9 (diff)
parent7bc3312bef4d6f220812500c0de7868fb7625a41 (diff)
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (199 commits) [MTD] NAND: Fix breakage all over the place [PATCH] NAND: fix remaining OOB length calculation [MTD] NAND Fixup NDFC merge brokeness [MTD NAND] S3C2410 driver cleanup [MTD NAND] s3c24x0 board: Fix clock handling, ensure proper initialisation. [JFFS2] Check CRC32 on dirent and data nodes each time they're read [JFFS2] When retiring nextblock, allocate a node_ref for the wasted space [JFFS2] Mark XATTR support as experimental, for now [JFFS2] Don't trust node headers before the CRC is checked. [MTD] Restore MTD_ROM and MTD_RAM types [MTD] assume mtd->writesize is 1 for NOR flashes [MTD NAND] Fix s3c2410 NAND driver so it at least _looks_ like it compiles [MTD] Prepare physmap for 64-bit-resources [JFFS2] Fix more breakage caused by janitorial meddling. [JFFS2] Remove stray __exit from jffs2_compressors_exit() [MTD] Allow alternate JFFS2 mount variant for root filesystem. [MTD] Disconnect struct mtd_info from ABI [MTD] replace MTD_RAM with MTD_GENERIC_TYPE [MTD] replace MTD_ROM with MTD_GENERIC_TYPE [MTD] remove a forgotten MTD_XIP ...
Diffstat (limited to 'fs/jffs2/super.c')
-rw-r--r--fs/jffs2/super.c20
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),