--- zzzz-none-000/linux-2.6.28.10/fs/ubifs/super.c 2009-05-02 18:54:43.000000000 +0000 +++ fusiv-7390-686/linux-2.6.28.10/fs/ubifs/super.c 2012-02-14 14:37:49.000000000 +0000 @@ -900,6 +900,29 @@ {Opt_err, NULL}, }; +#ifdef CONFIG_FUSIV_VX185 +/** + * parse_standard_option - parse a standard mount option. + * @option: the option to parse + * + * Normally, standard mount options like "sync" are passed to file-systems as + * flags. However, when a "rootflags=" kernel boot parameter is used, they may + * be present in the options string. This function tries to deal with this + * situation and parse standard options. Returns 0 if the option was not + * recognized, and the corresponding integer flag if it was. + * + * UBIFS is only interested in the "sync" option, so do not check for anything + * else. + */ +static int parse_standard_option(const char *option) +{ + ubifs_msg("parse %s", option); + if (!strcmp(option, "sync")) + return MS_SYNCHRONOUS; + return 0; +} +#endif + /** * ubifs_parse_options - parse mount parameters. * @c: UBIFS file-system description object @@ -951,9 +974,25 @@ c->no_chk_data_crc = 1; break; default: +#ifdef CONFIG_FUSIV_VX185 + { + unsigned long flag; + struct super_block *sb = c->vfs_sb; + + flag = parse_standard_option(p); + if (!flag) { + ubifs_err("unrecognized mount option \"%s\" " + "or missing value", p); + return -EINVAL; + } + sb->s_flags |= flag; + break; + } +#else ubifs_err("unrecognized mount option \"%s\" " - "or missing value", p); - return -EINVAL; + "or missing value", p); + return -EINVAL; +#endif } } @@ -1787,6 +1826,9 @@ INIT_LIST_HEAD(&c->orph_list); INIT_LIST_HEAD(&c->orph_new); +#ifdef CONFIG_FUSIV_VX185 + c->vfs_sb = sb; +#endif c->highest_inum = UBIFS_FIRST_INO; c->lhead_lnum = c->ltail_lnum = UBIFS_LOG_LNUM;