summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2006-12-06 20:39:20 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 08:39:42 -0800
commitb2f2c76d17b68869914a1ec3ab04c7674668f60d (patch)
treea250b8256c2ffb01fbe705a623bb6744010191ae /fs/ext4
parente7dc95db2695dc92b223cdc49227ac57e63406d2 (diff)
[PATCH] ext4 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/ext4')
-rw-r--r--fs/ext4/balloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 2bcca5261ee..c5589b3f58e 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -1165,7 +1165,7 @@ retry:
* check if the first free block is within the
* free space we just reserved
*/
- if (start_block >= my_rsv->rsv_start && start_block < my_rsv->rsv_end)
+ if (start_block >= my_rsv->rsv_start && start_block <= my_rsv->rsv_end)
return 0; /* success */
/*
* if the first free bit we found is out of the reservable space