aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2006-12-06 23:41:25 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:48 -0500
commitff50dc562bf6de00fec264b11531e2745209ba12 (patch)
treec866557dfe97498e213e5a905f42834b51f82aed /fs/ext3
parent1650242324a0c19d629a8be0d5a8ecdc174d31f8 (diff)
[PATCH] ext3 balloc: fix off-by-one against rsv_end
rsv_end is the last block within the reservation, so alloc_new_reservation should accept start_block == rsv_end as success. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext3')
-rw-r--r--fs/ext3/balloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index 0706a45d3c07..57cf47a9420e 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -1148,7 +1148,7 @@ retry:
1148 * check if the first free block is within the 1148 * check if the first free block is within the
1149 * free space we just reserved 1149 * free space we just reserved
1150 */ 1150 */
1151 if (start_block >= my_rsv->rsv_start && start_block < my_rsv->rsv_end) 1151 if (start_block >= my_rsv->rsv_start && start_block <= my_rsv->rsv_end)
1152 return 0; /* success */ 1152 return 0; /* success */
1153 /* 1153 /*
1154 * if the first free bit we found is out of the reservable space 1154 * if the first free bit we found is out of the reservable space