Merge tag 'erofs-for-6.19-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs

Pull erofs fix from Gao Xiang:
"Junbeom reported that synchronous reads could hit unintended EIOs
under memory pressure due to incorrect error propagation in
z_erofs_decompress_queue(), where earlier physical clusters in the
same decompression queue may be served for another readahead.

This addresses the issue by decompressing each physical cluster
independently as long as disk I/Os succeed, rather than being impacted
by the error status of previous physical clusters in the same queue.

Summary:

- Fix unexpected EIOs under memory pressure caused by recent
incorrect error propagation logic"

* tag 'erofs-for-6.19-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
erofs: fix unexpected EIO under memory pressure

+4 -4
+4 -4
fs/erofs/zdata.c
··· 1262 1262 return err; 1263 1263 } 1264 1264 1265 - static int z_erofs_decompress_pcluster(struct z_erofs_backend *be, int err) 1265 + static int z_erofs_decompress_pcluster(struct z_erofs_backend *be, bool eio) 1266 1266 { 1267 1267 struct erofs_sb_info *const sbi = EROFS_SB(be->sb); 1268 1268 struct z_erofs_pcluster *pcl = be->pcl; ··· 1270 1270 const struct z_erofs_decompressor *alg = 1271 1271 z_erofs_decomp[pcl->algorithmformat]; 1272 1272 bool try_free = true; 1273 - int i, j, jtop, err2; 1273 + int i, j, jtop, err2, err = eio ? -EIO : 0; 1274 1274 struct page *page; 1275 1275 bool overlapped; 1276 1276 const char *reason; ··· 1413 1413 .pcl = io->head, 1414 1414 }; 1415 1415 struct z_erofs_pcluster *next; 1416 - int err = io->eio ? -EIO : 0; 1416 + int err = 0; 1417 1417 1418 1418 for (; be.pcl != Z_EROFS_PCLUSTER_TAIL; be.pcl = next) { 1419 1419 DBG_BUGON(!be.pcl); 1420 1420 next = READ_ONCE(be.pcl->next); 1421 - err = z_erofs_decompress_pcluster(&be, err) ?: err; 1421 + err = z_erofs_decompress_pcluster(&be, io->eio) ?: err; 1422 1422 } 1423 1423 return err; 1424 1424 }