Commit 65aa35c9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'erofs-for-5.4-rc2-fixes' of git://

Pull erofs fixes from Gao Xiang:
 "Three patches to address regressions due to recent cleanups, mainly
  found by stress test on latest mainline kernel (no more regression out
  compared with older kernels for more than a week)

  One additional patch updates sub-entries in MAINTAINERS.


   - Fix error handling in erofs_read_superblock

   - Fix locking in erofs_get_meta_page

   - Fix inplace behavior due to decompression frontend cleanup

   - Update sub-entries in MAINTAINERS in order to better blame"

* tag 'erofs-for-5.4-rc2-fixes' of git://
  erofs: fix mis-inplace determination related with noio chain
  erofs: fix erofs_get_meta_page locking due to a cleanup
  MAINTAINERS: erofs: complete sub-entries for erofs
  erofs: fix return value check in erofs_read_superblock()
parents 3fd57e7a dc76ea8c
......@@ -6112,7 +6112,10 @@ M: Gao Xiang <>
M: Chao Yu <>
S: Maintained
T: git git://
F: Documentation/filesystems/erofs.txt
F: fs/erofs/
F: include/trace/events/erofs.h
M: Jeff Layton <>
......@@ -34,11 +34,15 @@ static void erofs_readendio(struct bio *bio)
struct page *erofs_get_meta_page(struct super_block *sb, erofs_blk_t blkaddr)
struct inode *const bd_inode = sb->s_bdev->bd_inode;
struct address_space *const mapping = bd_inode->i_mapping;
struct address_space *const mapping = sb->s_bdev->bd_inode->i_mapping;
struct page *page;
return read_cache_page_gfp(mapping, blkaddr,
page = read_cache_page_gfp(mapping, blkaddr,
mapping_gfp_constraint(mapping, ~__GFP_FS));
/* should already be PageUptodate */
if (!IS_ERR(page))
return page;
static int erofs_map_blocks_flatmode(struct inode *inode,
......@@ -105,9 +105,9 @@ static int erofs_read_superblock(struct super_block *sb)
int ret;
page = read_mapping_page(sb->s_bdev->bd_inode->i_mapping, 0, NULL);
if (!page) {
if (IS_ERR(page)) {
erofs_err(sb, "cannot read erofs superblock");
return -EIO;
return PTR_ERR(page);
sbi = EROFS_SB(sb);
......@@ -575,7 +575,7 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe,
struct erofs_map_blocks *const map = &fe->map;
struct z_erofs_collector *const clt = &fe->clt;
const loff_t offset = page_offset(page);
bool tight = (clt->mode >= COLLECT_PRIMARY_HOOKED);
bool tight = true;
enum z_erofs_cache_alloctype cache_strategy;
enum z_erofs_page_type page_type;
......@@ -628,8 +628,16 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe,
preload_compressed_pages(clt, MNGD_MAPPING(sbi),
cache_strategy, pagepool);
tight &= (clt->mode >= COLLECT_PRIMARY_HOOKED);
* Ensure the current partial page belongs to this submit chain rather
* than other concurrent submit chains or the noio(bypass) chain since
* those chains are handled asynchronously thus the page cannot be used
* for inplace I/O or pagevec (should be processed in strict order.)
tight &= (clt->mode >= COLLECT_PRIMARY_HOOKED &&
cur = end - min_t(unsigned int, offset + end - map->m_la, end);
if (!(map->m_flags & EROFS_MAP_MAPPED)) {
zero_user_segment(page, cur, end);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment