--- zzzz-none-000/linux-3.10.107/fs/jffs2/super.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/fs/jffs2/super.c 2021-02-04 17:41:59.000000000 +0000 @@ -138,16 +138,16 @@ struct jffs2_inode_info *f; uint32_t pino; - BUG_ON(!S_ISDIR(child->d_inode->i_mode)); + BUG_ON(!d_is_dir(child)); - f = JFFS2_INODE_INFO(child->d_inode); + f = JFFS2_INODE_INFO(d_inode(child)); pino = f->inocache->pino_nlink; JFFS2_DEBUG("Parent of directory ino #%u is #%u\n", f->inocache->ino, pino); - return d_obtain_alias(jffs2_iget(child->d_inode->i_sb, pino)); + return d_obtain_alias(jffs2_iget(d_inode(child)->i_sb, pino)); } static const struct export_operations jffs2_export_ops = { @@ -243,6 +243,7 @@ struct jffs2_sb_info *c = JFFS2_SB_INFO(sb); int err; + sync_filesystem(sb); err = jffs2_parse_options(c, data); if (err) return -EINVAL; @@ -374,14 +375,41 @@ BUILD_BUG_ON(sizeof(struct jffs2_raw_inode) != 68); BUILD_BUG_ON(sizeof(struct jffs2_raw_summary) != 32); - pr_info("version 2.2." + pr_info("version 2.2" #ifdef CONFIG_JFFS2_FS_WRITEBUFFER " (NAND)" #endif #ifdef CONFIG_JFFS2_SUMMARY - " (SUMMARY) " + " (SUMMARY)" #endif - " © 2001-2006 Red Hat, Inc.\n"); +#ifdef CONFIG_JFFS2_ZLIB + " (ZLIB)" +#endif +#ifdef CONFIG_JFFS2_LZO + " (LZO)" +#endif +#ifdef CONFIG_JFFS2_LZMA + " (LZMA)" +#endif +#ifdef CONFIG_JFFS2_RTIME + " (RTIME)" +#endif +#ifdef CONFIG_JFFS2_RUBIN + " (RUBIN)" +#endif +#ifdef CONFIG_JFFS2_CMODE_NONE + " (CMODE_NONE)" +#endif +#ifdef CONFIG_JFFS2_CMODE_PRIORITY + " (CMODE_PRIORITY)" +#endif +#ifdef CONFIG_JFFS2_CMODE_SIZE + " (CMODE_SIZE)" +#endif +#ifdef CONFIG_JFFS2_CMODE_FAVOURLZO + " (CMODE_FAVOURLZO)" +#endif + " (c) 2001-2006 Red Hat, Inc.\n"); jffs2_inode_cachep = kmem_cache_create("jffs2_i", sizeof(struct jffs2_inode_info),