File tree Expand file tree Collapse file tree 1 file changed +14
-19
lines changed Expand file tree Collapse file tree 1 file changed +14
-19
lines changed Original file line number Diff line number Diff line change @@ -643,28 +643,23 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe,
643
643
repeat :
644
644
cur = end - 1 ;
645
645
646
- /* lucky, within the range of the current map_blocks */
647
- if (offset + cur >= map -> m_la &&
648
- offset + cur < map -> m_la + map -> m_llen ) {
646
+ if (offset + cur < map -> m_la ||
647
+ offset + cur >= map -> m_la + map -> m_llen ) {
648
+ erofs_dbg ("out-of-range map @ pos %llu" , offset + cur );
649
+
650
+ if (z_erofs_collector_end (fe ))
651
+ fe -> backmost = false;
652
+ map -> m_la = offset + cur ;
653
+ map -> m_llen = 0 ;
654
+ err = z_erofs_map_blocks_iter (inode , map , 0 );
655
+ if (err )
656
+ goto err_out ;
657
+ } else {
658
+ if (fe -> pcl )
659
+ goto hitted ;
649
660
/* didn't get a valid pcluster previously (very rare) */
650
- if (!fe -> pcl )
651
- goto restart_now ;
652
- goto hitted ;
653
661
}
654
662
655
- /* go ahead the next map_blocks */
656
- erofs_dbg ("%s: [out-of-range] pos %llu" , __func__ , offset + cur );
657
-
658
- if (z_erofs_collector_end (fe ))
659
- fe -> backmost = false;
660
-
661
- map -> m_la = offset + cur ;
662
- map -> m_llen = 0 ;
663
- err = z_erofs_map_blocks_iter (inode , map , 0 );
664
- if (err )
665
- goto err_out ;
666
-
667
- restart_now :
668
663
if (!(map -> m_flags & EROFS_MAP_MAPPED ))
669
664
goto hitted ;
670
665
You can’t perform that action at this time.
0 commit comments