Re: [PATCH] zram: fix partial I/O config check

From: Barry Song

Date: Sun May 31 2026 - 17:38:29 EST


On Sun, May 31, 2026 at 8:35 PM Jianyue Wu <wujianyue000@xxxxxxxxx> wrote:
>
> IS_ENABLED() expects a CONFIG_* symbol. Use the real Kconfig symbol so
> this warning reflects whether synchronous partial I/O is built in.
>
> Signed-off-by: Jianyue Wu <wujianyue000@xxxxxxxxx>
> ---
> zram: fix partial I/O config check
> ---
> drivers/block/zram/zram_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index 6e1330ce4bc1..72f89fd5572e 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -1510,7 +1510,7 @@ static int read_from_bdev(struct zram *zram, struct page *page, u32 index,
> {
> atomic64_inc(&zram->stats.bd_reads);
> if (!parent) {
> - if (WARN_ON_ONCE(!IS_ENABLED(ZRAM_PARTIAL_IO)))
> + if (WARN_ON_ONCE(!IS_ENABLED(CONFIG_ZRAM_PARTIAL_IO)))

However, I don't see ZRAM_PARTIAL_IO defined as a Kconfig option.

#if PAGE_SIZE != 4096
static inline bool is_partial_io(struct bio_vec *bvec)
{
return bvec->bv_len != PAGE_SIZE;
}
#define ZRAM_PARTIAL_IO 1
#else
static inline bool is_partial_io(struct bio_vec *bvec)
{
return false;
}
#endif


> return -EIO;
> return read_from_bdev_sync(zram, page, index, blk_idx);
> }
>
> ---
> base-commit: 404fb4f38e8f38469dfff4df0205c9d18eeb1f57
> change-id: 20260531-zram-fix-partial-io-config-check-on-akpm-c62b972416f8
>
> Best regards,
> --
> Jianyue Wu <wujianyue000@xxxxxxxxx>
>