erofs: fix block count report when 48-bit layout is on
Fix incorrect shift order when combining the 48-bit block count.
Fixes: 2e1473d519 ("erofs: implement 48-bit block addressing for unencoded inodes")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250807082019.3093539-1-hsiangkao@linux.alibaba.com
pull/1317/head
parent
c99fab6e80
commit
0b96d9bed3
|
|
@ -323,8 +323,8 @@ static int erofs_read_superblock(struct super_block *sb)
|
||||||
sbi->islotbits = ilog2(sizeof(struct erofs_inode_compact));
|
sbi->islotbits = ilog2(sizeof(struct erofs_inode_compact));
|
||||||
if (erofs_sb_has_48bit(sbi) && dsb->rootnid_8b) {
|
if (erofs_sb_has_48bit(sbi) && dsb->rootnid_8b) {
|
||||||
sbi->root_nid = le64_to_cpu(dsb->rootnid_8b);
|
sbi->root_nid = le64_to_cpu(dsb->rootnid_8b);
|
||||||
sbi->dif0.blocks = (sbi->dif0.blocks << 32) |
|
sbi->dif0.blocks = sbi->dif0.blocks |
|
||||||
le16_to_cpu(dsb->rb.blocks_hi);
|
((u64)le16_to_cpu(dsb->rb.blocks_hi) << 32);
|
||||||
} else {
|
} else {
|
||||||
sbi->root_nid = le16_to_cpu(dsb->rb.rootnid_2b);
|
sbi->root_nid = le16_to_cpu(dsb->rb.rootnid_2b);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue