aboutsummaryrefslogtreecommitdiff
path: root/fs/jffs2/nodemgmt.c
diff options
context:
space:
mode:
authorFerenc Havasi <havasi@inf.u-szeged.hu>2005-09-16 13:58:20 +0100
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 21:47:18 +0100
commit34c0e906718fa2f85b54b937f79bffdca48ee864 (patch)
treeff07b9203c8f149c1f69f0e6bc2e6cf15d56fa3d /fs/jffs2/nodemgmt.c
parent962034f43937d02a1c18e802a6641aed0a266ac5 (diff)
[JFFS2] Account summary space in reserved_size.
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>
Diffstat (limited to 'fs/jffs2/nodemgmt.c')
-rw-r--r--fs/jffs2/nodemgmt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
index 208b2bdf01e..2cf576ae112 100644
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -7,7 +7,7 @@
*
* 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 $
*
*/
@@ -307,6 +307,8 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, uin
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) {