Commit 0d606e2
committed
ext4: fix type-widening bug in inode table readahead code
Due to a missing cast, the high 32-bits of a 64-bit block number used
when calculating the readahead block for inode tables can get lost.
This means we can end up fetching the wrong blocks for readahead for
file systems > 16TB.
Linus found this when experimenting with an enhacement to the sparse
static code checker which checks for missing widening casts before
binary "not" operators.
Reported-by: Linus Torvalds <[email protected]>
Signed-off-by: "Theodore Ts'o" <[email protected]>1 parent 3f8a641 commit 0d606e2
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4011 | 4011 | | |
4012 | 4012 | | |
4013 | 4013 | | |
| 4014 | + | |
4014 | 4015 | | |
4015 | 4016 | | |
4016 | 4017 | | |
4017 | | - | |
| 4018 | + | |
4018 | 4019 | | |
4019 | 4020 | | |
4020 | | - | |
| 4021 | + | |
4021 | 4022 | | |
4022 | 4023 | | |
4023 | 4024 | | |
| |||
0 commit comments