|
@@ -1308,12 +1308,14 @@ out:
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static inline int __z_erofs_vle_normalaccess_readpages(
|
|
|
- struct file *filp,
|
|
|
- struct address_space *mapping,
|
|
|
- struct list_head *pages, unsigned int nr_pages, bool sync)
|
|
|
+static int z_erofs_vle_normalaccess_readpages(struct file *filp,
|
|
|
+ struct address_space *mapping,
|
|
|
+ struct list_head *pages,
|
|
|
+ unsigned int nr_pages)
|
|
|
{
|
|
|
struct inode *const inode = mapping->host;
|
|
|
+ struct erofs_sb_info *const sbi = EROFS_I_SB(inode);
|
|
|
+ const bool sync = __should_decompress_synchronously(sbi, nr_pages);
|
|
|
|
|
|
struct z_erofs_vle_frontend f = VLE_FRONTEND_INIT(inode);
|
|
|
gfp_t gfp = mapping_gfp_constraint(mapping, GFP_KERNEL);
|
|
@@ -1372,16 +1374,6 @@ static inline int __z_erofs_vle_normalaccess_readpages(
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static int z_erofs_vle_normalaccess_readpages(
|
|
|
- struct file *filp,
|
|
|
- struct address_space *mapping,
|
|
|
- struct list_head *pages, unsigned int nr_pages)
|
|
|
-{
|
|
|
- return __z_erofs_vle_normalaccess_readpages(filp,
|
|
|
- mapping, pages, nr_pages,
|
|
|
- nr_pages < 4 /* sync */);
|
|
|
-}
|
|
|
-
|
|
|
const struct address_space_operations z_erofs_vle_normalaccess_aops = {
|
|
|
.readpage = z_erofs_vle_normalaccess_readpage,
|
|
|
.readpages = z_erofs_vle_normalaccess_readpages,
|