From: Charles Manning Date: Sun, 7 Jul 2013 23:45:21 +0000 (+1200) Subject: Handle inband tags flag better X-Git-Tag: aleph1-release~48^2~2 X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=e3a8eb21bed45b29ca33e7721b39c969f9399dff;hp=ab9a00dce3929c4c8cc1f01db34b23ba64a850ce Handle inband tags flag better Signed-off-by: Charles Manning --- diff --git a/yaffs_vfs_multi.c b/yaffs_vfs_multi.c index b067436..09aed4a 100644 --- a/yaffs_vfs_multi.c +++ b/yaffs_vfs_multi.c @@ -2605,6 +2605,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version, struct yaffs_param *param; int read_only = 0; + int inband_tags = 0; struct yaffs_options options; @@ -2683,7 +2684,11 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version, yaffs_version = 1; } - if(yaffs_verify_mtd(mtd, yaffs_version, options.inband_tags) < 0) + if (mtd->oobavail < sizeof(struct yaffs_packed_tags2) || + options.inband_tags) + inband_tags = 1; + + if(yaffs_verify_mtd(mtd, yaffs_version, inband_tags) < 0) return NULL; /* OK, so if we got here, we have an MTD that's NAND and looks @@ -2744,10 +2749,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version, param->n_reserved_blocks = 5; param->n_caches = (options.no_cache) ? 0 : 10; - - if (mtd->oobavail < sizeof(struct yaffs_packed_tags2) || - options.inband_tags) - param->inband_tags = 1; + param->inband_tags = inband_tags; param->enable_xattr = 1; if (options.lazy_loading_overridden)