Revert "ext4fs: Fix: Read outside partition error"
The issue here is that the function read_allocated_block() will report
problems via a negative return value. If we say the return value is
stored in an lbaint_t that can no longer happen (and Coverity discovered
this by reporting a no effect comparison and then dead code). The
problem being fixed by allowing for storing a larger block number will
have to be solved in some other manner.
This reverts commit df2ed552f0
.
Addresses-Coverity-ID: 131183
Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -101,7 +101,7 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos,
|
|||||||
blockcnt = lldiv(((len + pos) + blocksize - 1), blocksize);
|
blockcnt = lldiv(((len + pos) + blocksize - 1), blocksize);
|
||||||
|
|
||||||
for (i = lldiv(pos, blocksize); i < blockcnt; i++) {
|
for (i = lldiv(pos, blocksize); i < blockcnt; i++) {
|
||||||
lbaint_t blknr;
|
long int blknr;
|
||||||
int blockoff = pos - (blocksize * i);
|
int blockoff = pos - (blocksize * i);
|
||||||
int blockend = blocksize;
|
int blockend = blocksize;
|
||||||
int skipfirst = 0;
|
int skipfirst = 0;
|
||||||
|
Reference in New Issue
Block a user