
From: Mingming Cao <cmm@us.ibm.com>

Add check for maxium reservation window size when growing reservation window.


---

 25-akpm/fs/ext3/balloc.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN fs/ext3/balloc.c~ext3-reservation-max-window-size-check-patch fs/ext3/balloc.c
--- 25/fs/ext3/balloc.c~ext3-reservation-max-window-size-check-patch	2004-04-23 23:10:40.104208312 -0700
+++ 25-akpm/fs/ext3/balloc.c	2004-04-23 23:10:40.108207704 -0700
@@ -757,6 +757,8 @@ static int alloc_new_reservation(struct 
 			 * otherwise keep the same
 			 */
 			size = size * 2;
+			if (size > EXT3_MAX_RESERVE_BLOCKS)
+				size = EXT3_MAX_RESERVE_BLOCKS;
 			atomic_set(&my_rsv->rsv_goal_size, size);
 		}
 		rsv_window_remove(my_rsv);

_
