summaryrefslogtreecommitdiffstats
path: root/fs/ext4/balloc.c
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/balloc.c
parente7dc95db2695dc92b223cdc49227ac57e63406d2 (diff)
downloadop-kernel-dev-b2f2c76d17b68869914a1ec3ab04c7674668f60d.zip
op-kernel-dev-b2f2c76d17b68869914a1ec3ab04c7674668f60d.tar.gz
[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/balloc.c')
-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 2bcca52..c5589b3 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
OpenPOWER on IntegriCloud