[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231108024924.GG11577@google.com>
Date:   Wed, 8 Nov 2023 11:49:24 +0900
From:   Sergey Senozhatsky <senozhatsky@...omium.org>
To:     Vasily Averin <vasily.averin@...ux.dev>
Cc:     Sergey Senozhatsky <senozhatsky@...omium.org>,
        Minchan Kim <minchan@...nel.org>, linux-kernel@...r.kernel.org,
        linux-block@...r.kernel.org, zhouxianrong <zhouxianrong@...wei.com>
Subject: Re: [PATCH] zram: extra zram_get_element call in
 zram_read_from_zspool()
On (23/11/06 22:55), Vasily Averin wrote:
> 
> 'element' and 'handle' are union in struct zram_table_entry.
> 
> Fixes: 8e19d540d107 ("zram: extend zero pages to same element pages")
Sorry, what exactly does it fix?
[..]
> @@ -1318,12 +1318,10 @@ static int zram_read_from_zspool(struct zram *zram, struct page *page,
>  
>  	handle = zram_get_handle(zram, index);
>  	if (!handle || zram_test_flag(zram, index, ZRAM_SAME)) {
> -		unsigned long value;
>  		void *mem;
>  
> -		value = handle ? zram_get_element(zram, index) : 0;
>  		mem = kmap_atomic(page);
> -		zram_fill_page(mem, PAGE_SIZE, value);
> +		zram_fill_page(mem, PAGE_SIZE, handle);
>  		kunmap_atomic(mem);
>  		return 0;
>  	}
Powered by blists - more mailing lists
 
