ext2: fix confusion between logical and physical block numbers
authorH. Peter Anvin <hpa@zytor.com>
Tue, 16 Feb 2010 21:37:42 +0000 (13:37 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 16 Feb 2010 21:37:42 +0000 (13:37 -0800)
Fix a minor confusion between logical and physical block numbers in
the new iterative bmap implementation.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/fs/ext2/bmap.c

index 589a372..e25759f 100644 (file)
@@ -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;
 }
 
 /*