Changes since last update:
- Fix LZMA decompression failure on HIGHMEM platforms; - Revert an inproper fix since it is actually an implementation issue of vmalloc(); - Avoid a wrong DBG_BUGON since it could be triggered with -EINTR; - Minor cleanups. -----BEGIN PGP SIGNATURE----- iIcEABYIAC8WIQThPAmQN9sSA0DVxtI5NzHcH7XmBAUCZAtOhBEceGlhbmdAa2Vy bmVsLm9yZwAKCRA5NzHcH7XmBKamAQC4njqAPMt1SPJU1HYACnS8TuNIC0CO2eT6 gU11ja+AZwEAwwyjucoEirD1xCDBlTOUD2fPm3W87RVNr2juiZg2OA8= =Dj3V -----END PGP SIGNATURE----- Merge tag 'erofs-for-6.3-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: "The most important one reverts an improper fix which can cause an unexpected warning more often on specific images, and another one fixes LZMA decompression on 32-bit platforms. The others are minor fixes and cleanups. - Fix LZMA decompression failure on HIGHMEM platforms - Revert an inproper fix since it is actually an implementation issue of vmalloc() - Avoid a wrong DBG_BUGON since it could be triggered with -EINTR - Minor cleanups" * tag 'erofs-for-6.3-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: use wrapper i_blocksize() in erofs_file_read_iter() erofs: get rid of a useless DBG_BUGON erofs: Revert "erofs: fix kvcalloc() misuse with __GFP_NOFAIL" erofs: fix wrong kunmap when using LZMA on HIGHMEM platforms erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init
This commit is contained in:
commit
388a810192
|
@ -376,7 +376,7 @@ static ssize_t erofs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
|
||||||
if (bdev)
|
if (bdev)
|
||||||
blksize_mask = bdev_logical_block_size(bdev) - 1;
|
blksize_mask = bdev_logical_block_size(bdev) - 1;
|
||||||
else
|
else
|
||||||
blksize_mask = (1 << inode->i_blkbits) - 1;
|
blksize_mask = i_blocksize(inode) - 1;
|
||||||
|
|
||||||
if ((iocb->ki_pos | iov_iter_count(to) |
|
if ((iocb->ki_pos | iov_iter_count(to) |
|
||||||
iov_iter_alignment(to)) & blksize_mask)
|
iov_iter_alignment(to)) & blksize_mask)
|
||||||
|
|
|
@ -47,7 +47,7 @@ void z_erofs_lzma_exit(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int z_erofs_lzma_init(void)
|
int __init z_erofs_lzma_init(void)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ again:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (no < nrpages_out && strm->buf.out)
|
if (no < nrpages_out && strm->buf.out)
|
||||||
kunmap(rq->in[no]);
|
kunmap(rq->out[no]);
|
||||||
if (ni < nrpages_in)
|
if (ni < nrpages_in)
|
||||||
kunmap(rq->in[ni]);
|
kunmap(rq->in[ni]);
|
||||||
/* 4. push back LZMA stream context to the global list */
|
/* 4. push back LZMA stream context to the global list */
|
||||||
|
|
|
@ -486,7 +486,7 @@ static inline void *erofs_vm_map_ram(struct page **pages, unsigned int count)
|
||||||
void *erofs_get_pcpubuf(unsigned int requiredpages);
|
void *erofs_get_pcpubuf(unsigned int requiredpages);
|
||||||
void erofs_put_pcpubuf(void *ptr);
|
void erofs_put_pcpubuf(void *ptr);
|
||||||
int erofs_pcpubuf_growsize(unsigned int nrpages);
|
int erofs_pcpubuf_growsize(unsigned int nrpages);
|
||||||
void erofs_pcpubuf_init(void);
|
void __init erofs_pcpubuf_init(void);
|
||||||
void erofs_pcpubuf_exit(void);
|
void erofs_pcpubuf_exit(void);
|
||||||
|
|
||||||
int erofs_register_sysfs(struct super_block *sb);
|
int erofs_register_sysfs(struct super_block *sb);
|
||||||
|
@ -545,7 +545,7 @@ static inline int z_erofs_fill_inode(struct inode *inode) { return -EOPNOTSUPP;
|
||||||
#endif /* !CONFIG_EROFS_FS_ZIP */
|
#endif /* !CONFIG_EROFS_FS_ZIP */
|
||||||
|
|
||||||
#ifdef CONFIG_EROFS_FS_ZIP_LZMA
|
#ifdef CONFIG_EROFS_FS_ZIP_LZMA
|
||||||
int z_erofs_lzma_init(void);
|
int __init z_erofs_lzma_init(void);
|
||||||
void z_erofs_lzma_exit(void);
|
void z_erofs_lzma_exit(void);
|
||||||
int z_erofs_load_lzma_config(struct super_block *sb,
|
int z_erofs_load_lzma_config(struct super_block *sb,
|
||||||
struct erofs_super_block *dsb,
|
struct erofs_super_block *dsb,
|
||||||
|
|
|
@ -114,7 +114,7 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void erofs_pcpubuf_init(void)
|
void __init erofs_pcpubuf_init(void)
|
||||||
{
|
{
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
|
|
|
@ -1312,12 +1312,12 @@ static int z_erofs_decompress_pcluster(struct z_erofs_decompress_backend *be,
|
||||||
|
|
||||||
if (!be->decompressed_pages)
|
if (!be->decompressed_pages)
|
||||||
be->decompressed_pages =
|
be->decompressed_pages =
|
||||||
kcalloc(be->nr_pages, sizeof(struct page *),
|
kvcalloc(be->nr_pages, sizeof(struct page *),
|
||||||
GFP_KERNEL | __GFP_NOFAIL);
|
GFP_KERNEL | __GFP_NOFAIL);
|
||||||
if (!be->compressed_pages)
|
if (!be->compressed_pages)
|
||||||
be->compressed_pages =
|
be->compressed_pages =
|
||||||
kcalloc(pclusterpages, sizeof(struct page *),
|
kvcalloc(pclusterpages, sizeof(struct page *),
|
||||||
GFP_KERNEL | __GFP_NOFAIL);
|
GFP_KERNEL | __GFP_NOFAIL);
|
||||||
|
|
||||||
z_erofs_parse_out_bvecs(be);
|
z_erofs_parse_out_bvecs(be);
|
||||||
err2 = z_erofs_parse_in_bvecs(be, &overlapped);
|
err2 = z_erofs_parse_in_bvecs(be, &overlapped);
|
||||||
|
@ -1365,7 +1365,7 @@ out:
|
||||||
}
|
}
|
||||||
if (be->compressed_pages < be->onstack_pages ||
|
if (be->compressed_pages < be->onstack_pages ||
|
||||||
be->compressed_pages >= be->onstack_pages + Z_EROFS_ONSTACK_PAGES)
|
be->compressed_pages >= be->onstack_pages + Z_EROFS_ONSTACK_PAGES)
|
||||||
kfree(be->compressed_pages);
|
kvfree(be->compressed_pages);
|
||||||
z_erofs_fill_other_copies(be, err);
|
z_erofs_fill_other_copies(be, err);
|
||||||
|
|
||||||
for (i = 0; i < be->nr_pages; ++i) {
|
for (i = 0; i < be->nr_pages; ++i) {
|
||||||
|
@ -1384,7 +1384,7 @@ out:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (be->decompressed_pages != be->onstack_pages)
|
if (be->decompressed_pages != be->onstack_pages)
|
||||||
kfree(be->decompressed_pages);
|
kvfree(be->decompressed_pages);
|
||||||
|
|
||||||
pcl->length = 0;
|
pcl->length = 0;
|
||||||
pcl->partial = true;
|
pcl->partial = true;
|
||||||
|
|
|
@ -757,9 +757,6 @@ int z_erofs_map_blocks_iter(struct inode *inode, struct erofs_map_blocks *map,
|
||||||
err = z_erofs_do_map_blocks(inode, map, flags);
|
err = z_erofs_do_map_blocks(inode, map, flags);
|
||||||
out:
|
out:
|
||||||
trace_z_erofs_map_blocks_iter_exit(inode, map, flags, err);
|
trace_z_erofs_map_blocks_iter_exit(inode, map, flags, err);
|
||||||
|
|
||||||
/* aggressively BUG_ON iff CONFIG_EROFS_FS_DEBUG is on */
|
|
||||||
DBG_BUGON(err < 0 && err != -ENOMEM);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue