diff options
author | Hugh Dickins <hugh@veritas.com> | 2006-12-07 04:39:26 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 16:39:43 (GMT) |
commit | ec0837f230e57afde65db72539e748d2a75abed0 (patch) | |
tree | c997afd235decff9f36b5cc4bfae5e132d86f656 /fs/ext4/balloc.c | |
parent | 341cee438593ff9c4520fb73c561460074f29a9a (diff) | |
download | linux-fsl-qoriq-ec0837f230e57afde65db72539e748d2a75abed0.tar.xz |
[PATCH] ext4 balloc: fix _with_rsv freeze
Port fix to the off-by-one in find_next_usable_block's memscan from ext2 to
ext4; but it didn't cause a serious problem for ext4 because the additional
ext4_test_allocatable check rescued it from the error.
[akpm@osdl.org: build fix]
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 1c8ef0e..c4dd110 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -747,7 +747,7 @@ find_next_usable_block(ext4_grpblk_t start, struct buffer_head *bh, here = 0; p = ((char *)bh->b_data) + (here >> 3); - r = memscan(p, 0, (maxblocks - here + 7) >> 3); + r = memscan(p, 0, ((maxblocks + 7) >> 3) - (here >> 3)); next = (r - ((char *)bh->b_data)) << 3; if (next < maxblocks && next >= start && ext4_test_allocatable(next, bh)) |