提交 34c0e906 编写于 作者: F Ferenc Havasi 提交者: Thomas Gleixner

[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: NFerenc Havasi <havasi@inf.u-szeged.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 962034f4
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* For licensing information, see the file 'LICENCE' in this directory. * 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 ...@@ -307,6 +307,8 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, uin
jffs2_close_nextblock(c, jeb); jffs2_close_nextblock(c, jeb);
jeb = NULL; jeb = NULL;
/* keep always valid value in reserved_size */
reserved_size = PAD(sumsize + c->summary->sum_size + JFFS2_SUMMARY_FRAME_SIZE);
} }
} else { } else {
if (jeb && minsize > jeb->free_size) { if (jeb && minsize > jeb->free_size) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册