diff -urN linux.old/drivers/mtd/maps/bcm947xx-flash.c linux.dev/drivers/mtd/maps/bcm947xx-flash.c
--- linux.old/drivers/mtd/maps/bcm947xx-flash.c 1970-01-01 01:00:00.000000000 +0100
+++ linux.dev/drivers/mtd/maps/bcm947xx-flash.c 2006-06-23 18:08:46.000000000 +0200
-@@ -0,0 +1,545 @@
+@@ -0,0 +1,547 @@
+/*
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
+ * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org>
+
+ /* Update the squashfs partition size based on the superblock info */
+ part->size = sb->bytes_used;
-+ part->size += (mtd->erasesize - 1);
-+ part->size &= ~(mtd->erasesize - 1);
++ len = part->offset + part->size;
++ len += (mtd->erasesize - 1);
++ len &= ~(mtd->erasesize - 1);
++ part->size = len - part->offset;
+ } else if (*((__u16 *) buf) == JFFS2_MAGIC_BITMASK) {
+ printk(KERN_INFO "%s: Filesystem type: jffs2\n", mtd->name);
+