Always keep valid data in reserved_size.
It did not cause problems, but the reservation code was unoptimal
when centralized summary was active or the size of the erase block
was very small.
Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: nodemgmt.c,v 1.125 2005/09/07 08:34:54 havasi Exp $
+ * $Id: nodemgmt.c,v 1.126 2005/09/16 12:58:17 havasi Exp $
*
*/
jffs2_close_nextblock(c, jeb);
jeb = NULL;
+ /* keep always valid value in reserved_size */
+ reserved_size = PAD(sumsize + c->summary->sum_size + JFFS2_SUMMARY_FRAME_SIZE);
}
} else {
if (jeb && minsize > jeb->free_size) {