[syslinux:pathbased] ext2: fix confusion between logical and physical block numbers

syslinux-bot for H. Peter Anvin hpa at zytor.com
Tue Feb 16 13:39:20 PST 2010


Commit-ID:  28f47a6b7c78aca4ad9991010502e650e8c80b04
Gitweb:     http://syslinux.zytor.com/commit/28f47a6b7c78aca4ad9991010502e650e8c80b04
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Tue, 16 Feb 2010 13:37:42 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Tue, 16 Feb 2010 13:37:42 -0800

ext2: fix confusion between logical and physical block numbers

Fix a minor confusion between logical and physical block numbers in
the new iterative bmap implementation.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 core/fs/ext2/bmap.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/fs/ext2/bmap.c b/core/fs/ext2/bmap.c
index 589a372..e25759f 100644
--- a/core/fs/ext2/bmap.c
+++ b/core/fs/ext2/bmap.c
@@ -91,10 +91,10 @@ static block_t bmap_indirect(struct fs_info *fs, uint32_t start,
     while (levels--) {
 	blk = get_cache(fs->fs_dev, start);
 	index = (block >> (levels * addr_shift)) & addr_mask;
-	block = blk[index];
+	start = blk[index];
     }
 
-    return block;
+    return start;
 }
 
 /*



More information about the Syslinux-commits mailing list